Send ^z(0x1A) code to asynchronous modem - IBM AS400

This is a discussion on Send ^z(0x1A) code to asynchronous modem - IBM AS400 ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Send ^z(0x1A) code to asynchronous modem

  1. 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)
    http://groups.google.co.th/group/com...9a5149690e581b

    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


  2. 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
    > when I try to send 0x1A then
    > I found it was changed from 0x1A to 0x07 automatically.


    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


  3. Re: Send ^z(0x1A) code to asynchronous modem


    Buck เขียน:
    > > 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.

    >
    > 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


    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


+ Reply to Thread