Register Login

When using CALL 'SYSTEM' id 'COMMAND' field unix-command, how does one capture the results of the command? For example, if the unix-command were the date?

Updated May 19, 2018

You capture the results in the table e.g TABL, like this
DATA: BEGIN OF TABL OCCURS 0,
LINE(560),
END OF TABL.
REFRESH TABL.
CALL 'SYSTEM' ID 'COMMAND' FIELD PARCOM_LOC
ID 'TAB' FIELD TABL-*SYS*.


Comments

  • 15 Jul 2010 8:56 pm Guest
    I am trying to send an e-mail using this command

    DATA: BEGIN OF TABL OCCURS 0,
    LINE(560),
    END OF TABL.
    REFRESH TABL.
    break bg740sr.
    * subject = '"Necho GL Posting Error Report"'.


    CONCATENATE '/prod/scripts/fi/mailit.sh' p_uname2
    email_id
    subject
    INTO command SEPARATED BY ' '.

    CALL 'SYSTEM' ID 'COMMAND' FIELD command
    ID 'TAB' FIELD TABL-*SYS*.

    but still did not get anything in table tabl.

×