COBOL/RPG run CL command
01 WS-CMD-STRING PIC X(2560).
01 WS-CMD-LEN PIC S9(10)V9(05) COMP-3 VALUE 2560.
MOVE "OVRPRTF FILE(FileNM) SHARE(*YES) OPNSCOPE(*JOB)"
TO WS-CMD-STRING.
CALL "QCMDEXC" USING WS-CMD-STRING, WS-CMD-LEN.
RPG:
* Run Command
DRunCommand PR extpgm('QCMDEXC')
D pCommand 32702 const
D pCmdLength 15 5 const
D pCommand S 32702
D pCmdLength S 15 5
pCommand = 'TAATOOL/CHKACTJOB JOB(' + %Trim(vJobNm) + ')';
eFlag = 'N';
Monitor;
RunCommand(pCommand: %len(pCommand));
On-Error;
eFlag = 'Y';
EndMon;
Comments
Post a Comment