Send ^z(0x1A) code to asynchronous modem
Hi all,
I'm a new programmer on AS/400 env.I need to write a program that
will use GSM modem
So I have to send at+cmgs=telephone\n and ^z but I can't send cause
when I try to send 0x1A then
I found it was changed from 0x1A to 0x07 automatically.
I use icf and dds format as below ( from old icf/comm answer of this
group)
[url]http://groups.google.co.th/group/comp.sys.ibm.as400.misc/browse_thread/thread/39209daebbe12d58/399a5149690e581b?lnk=st&q=readsn+icf&rnum=1&hl=th#399a5149690e581b[/url]
Also I check trnspy attribute of icf from book but It tell me for
bisync com only.
---------------------------------------------------------------------------*-------------------
A
A
A R READSN VARLEN(&LENFLD)
A INVITE
A COMMD 157A B
A LENFLD 5S P
A
A
A R CHGOPT FMH
A OPT1 7A
A
---------------------------------------------------------------------------*-------------------
Also I check trnspy attribute of icf from book but It tell me for
bisync com only.
If anyone can give me solution, I would GREATLY appreciate it!
would
Thankyou,
MT
Re: Send ^z(0x1A) code to asynchronous modem
> So I have to send at+cmgs=telephone\n and ^z but I can't send cause[color=blue]
> when I try to send 0x1A then
> I found it was changed from 0x1A to 0x07 automatically.[/color]
What code page is in use in your job (WRKJOB)?
Also, could you post the high level language that is sending the x'1a'?
(The RPG, Cobol, etc.)
--buck
Re: Send ^z(0x1A) code to asynchronous modem
Buck เขียน:[color=blue][color=green]
> > So I have to send at+cmgs=telephone\n and ^z but I can't send cause
> > when I try to send 0x1A then
> > I found it was changed from 0x1A to 0x07 automatically.[/color]
>
> What code page is in use in your job (WRKJOB)?
> Also, could you post the high level language that is sending the x'1a'?
> (The RPG, Cobol, etc.)
> --buck[/color]
These are about code attribute from my admin
CCSID=65535, LANGUAGE=English, Default code character set = 37
My part of C program (refer to my readsn record)
printf("Send SMS\n");
sprintf(&scan[157], "%5.5d", 24);
strncpy(scan,"at+cmgs=Telephone_Number\nABCDE",23);
scan[23]=0x1A;
rfb = _Rwrite (scanptr, &scan, 162);
Note:Telephone_Number size = 9 characters
Thanks,
MT