Hi,
I would like to know the following if anyone has experience.
I have got the following REXX code, for saving the joblog of a job from SDSF to a member of a PDS dataset.
The name of the job is supplied as input.
PARSE ARG JOBNAME
PDS=KA.JES2LOGS <----------- My PDS name, alreday allocated.
ADDRESS TSO
"ALLOCATE FILE(ISFIN) TRACKS SPACE(1) REU"
"ALLOC F(ISFOUT) DA("PDS"("JOBNAME")) OLD REUSE"
QUEUE "OWNER *"
QUEUE "PREFIX *"
QUEUE "ST "
QUEUE "SELECT "JOBNAME
QUEUE "AFD REFRESSH"
QUEUE "FIND "JOBNAME " LAST"
QUEUE "++S"
QUEUE "PRT ODSN JES2LOGS("JOBNAME") * OLD"
QUEUE "PRINT 1 9999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "END"
QUEUE "END"
QUEUE " "
"EXECIO" QUEUED()" DISKW ISFIN (FINIS "
ADDRESS ISPEXEC "SELECT PGM(SDSF) PARM('++60,132')"
The script works but it copies all the SDSF screens into the destination member.
I am only interested in getting the job log and not the output of the commands that are run before the job
is selected and opened.
Is there any way ?
Also I am not sure how come PGM(SDSF) call knows the input is in ISFIN and output will be wrttien to ISFOUT?
Would apprecaite anyone's help.
Thansk