Reputation: 11
My Rexx program accepts a value from the TSO command line when executing my Rexx program; the value is COBOL program name and then my Rexx program executes a JCL to compile it. How can I capture or display the compile output, specifically, SYSPRINT which contains if any errors are there. Currently my Rexx program after submitting the JCl Job shows the job submitted, that's it. But I want the program to show SYSPRINT output instead. The following is the Rexx code I have:
ARG_SRC_COM: PROCEDURE
ARG MEMBER1 MEMBER2
IF MEMBER2 = " " THEN DO
EXIT; END
ADDRESS TSO
ADDRESS ISPEXEC
"VPUT (MEMBER2) SHARED"
ADDRESS ISPEXEC
"VIEW DATASET('#5220.DEV.JCLLIB(COMPILEX)')
MACRO(MYMACRO)"
"CONTROL NONDISPL ENTER"
EXIT
RETURN 0
The Macro code is:
ADDRESS ISREDIT 'MACRO'
ADDRESS ISPEXEC "VGET MEMBER2 SHARED"
ADDRESS ISREDIT "CHANGE "MEM" "MEMBER2" ALL"
ADDRESS ISREDIT 'SUB'
ADDRESS ISREDIT 'CANCEL'
EXIT;"END"
This is my compile job output:
JES2 screen after submitting the JOB
After submitting the Job my rexx program takes it back to the original TSO screen where the compile request was made.
Upvotes: 1
Views: 187
Reputation: 26
@user1906668 You might start the 'STATUS' panel you used to show the 'JES2 screen after submitting the JOB' from your rexx.
Ex.
MYLIB = ' ... '
"ISPEXEC LIBDEF ISPPLIB DATASET ID('"MYLIB"')"
"ISPEXEC ADDPOP"
"ISPEXEC DISPLAY PANEL(STATUS)"
"ISPEXEC REMPOP"
"ISPEXEC LIBDEF ISPPLIB"
Upvotes: 0