Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JCL SDSF JOBNAME JOBID 1

Status
Not open for further replies.

tpms2000

Programmer
Jan 20, 2003
19
0
0
EU
Re the JOBNAME and JOBID that appears on screen when a Jcl is SUBmitted:
Can these two values be captured? Are they held in some variable. How does MVS generate the next JOBID?
I'd like to submit a job more than once, keep a record of the JOBID and try and use that info to send a print of the Held Output.
I have JCL to run SDSF but no Rexx to do this. Any examples out there?
Much obliged.
 
How are you proposing to execute the REXX? In batch or under ISPF?

The Jobid (Jobnumber) is nothing to do with MVS as such, JES assigns the number. Under normal circumstance JES assigns the Job number as the next lowest available incremental number. The numbering includes STCs and TSU and will wrap back to 1 when the highest number is reached (and this 'highest number' varies depending on your version of JES...in older versions the highest number was 9999). After a cold start of JES the numbering is easy to predict, but after a while it gets to be a bit of a lottery. For example lets say JES has number of the last task it assigned as JOB0007 the next task 'should' get JOB0008 unless 0008 has already been assigned, in that case it tries 0009 then 0010 etc until it finds the next available one.
 
KEVIN,
I would like to run the Rexx online as follows:
The User runs a job.
An audit file captures the userid jobname jobnumber and, perhaps, run time.
A few hours later the user, who has no access to sdsf, requests a print of the output by specifying the jobid they noted down earlier.
 
Isn't this something ISPF option 3.8 can do?...but anyway

try

Z = OUTTRAP(LIST.)
ADDRESS TSO "SUBMIT '"rundsn"("MEM")' NOJOBCHAR"
do z = 1 to list.0
say list.z
end
 
Do it in a REXX, put your job in a dataset and submit it like this

X = OUTTRAP("Subm.",1) /* Trap job submit message */
SUBMIT Dsn /* Submit the job */
X = OUTTRAP("OFF")
Zedsmsg = "Job subm., PF1 for info!"
Zedlmsg = "Submit done, return message is:" Subm.1"."

Uffe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top