On Sat, 5 Jan 2008 11:03:01 -0600, Kenneth E Tomiak wrote:
>SDSF can be run as a separate step or can be called from your program.
>Below is a step that will capture the JESJCL output. You then get to read it
>and parse it. On the system I can access right now I am not authorized to get
>the internal text using SDSF. SJ is not valid in batch as SDSF wants to put
>you in EDIT, and you don't get to control this. If you could get SJ to invoke
>EDIT and pass an initial edit macro you could get a copy of the job, with some
>restrictions.
>
I've played quite a bit with invoking the "batch" SDSF from Rexx.
>//STEP001 EXEC PGM=SDSF
>//ISFOUT DD SYSOUT=*
... or DD DUMMY. But you may need it for debugging.
>//DDNAME DD DISP=(NEW,CATLG),DSN=KTOMIAK.JOBOUT.JOB00207,
>// UNIT=SYSDA,SPACE=(TRK,(45,45),RLSE),
>// DCB=(DSORG=PS,RECFM=VB,BLKSIZE=0,LRECL=255)
... this can be allocated to a POSIX pipe (I've done this) and
the output parsed directly by Rexx. Or, allocate to a temporary
DSNAME and read it back.
>//ISFIN DD *
>PRE KTOMIAK*
... does this do anything better than "PRE *", other than optimize
the performance of the following commands? If so, I'd make the
entire JOBNAME the prefix to optimize even further.
>OWNER *
>H
... I'd use "ST" rather than "H", in order to select not only held
output but all jobs, including the very job issuing the commands.
>S KTOMIAKK JOB00207
In Rexx, I can get the jobname with MVSVAR('SYMDEF','JOBNAME'), but
is there any way to get the JOBID?
>F KTOMIAKK
>++?
>F JESJCL
... perhaps more useful than JESJCLIN or SJ because you can get the
substituted values from the IEFC653I message text. But are there
lexical ambiguities?
>++S
>PRINT FILE DDNAME
>PRINT
>PRINT CLOSE
>END
... achingly close despite being an egregious kludge. But JES3?
It would be wonderful to have a JCL SETENV command that would make
its operand string, after symbol substitution and with no 100-character
limit, available to an API in the job step program. But I'm pretty
much echoing the OP's wish.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html