I've just ran into a situation where I could really use some new "system
symbols" in JCL. In a batch job, we can basically only use &SYSUID in the
JCL. I could use two more, and I don't think that they would introduce any
problems. They would be &SYSJOBNA which would be the job name, and &SYSJOBNU
which would be the "job number" (like JOB12345). My basic use for these
would be an attempt to have an "almost unique" dataset name or UNIX PATH
name generated with these values. I do some really weird stuff (as is likely
already known). My application in this one case was for something like:
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTC LVL(some.qual) ALL OUTFILE(O)
//O DD PATH='/u/myid/sysout/&SYSJOBNA..&SYSJOBNU',
// PATHDISP=(KEEP,KEEP),
// FILEDATA=TEXT,
// PATHMODE=(SIRUSR,SIWUSR),
// PATHOPTS=(OCREAT,OTRUNC,OWRONLY)
//*
//PROCESS EXEC COZBATCH,
// PARM='/jobname=&SYSJOBNA jobnumber=&SYSJOBNU'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD *
. /etc/profile
. ~/.profile
cd ~/myid/sysout
process <${jobname}.${jobnumber}
/*
//
The "process" was actually a Perl script which did some messaging of the
LISTCAT output for me.
In any case, does this sound reasonable? Am I overlooking a case where
either of these system symbols could be "indeterminate"? The only one that I
can think of is a case where a job is NJE transmitted to another site and
receives a different job number. In that case, I think the job number should
be the job number at the execution site.
--
John
----------------------------------------------------------------------
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