printing spoolfiles
PRINTSP script:
PARM job=!HPLASTJOB# Prints spoolfile for a job, default is the last job you streamedif “!job” = “” then echo No job to print returnendifsetvar hplastjob “!job”if HPLASTSPID = “” then echo No $STDLIST spoolfile to print returnendifprint !HPLASTSPID.out.hpspool
:stream scopejob#J324:printsp:JOB SCOPEJOB,MANAGER.SYS,SCOPE. Priority = DS; Inpri = 8; Time = UNLIMITED seconds . . .
Notes:
- The default value for the parameter “JOB” is the job number of the job most recently streamed by you (HPLASTJOB variable).
- If you have not streamed a job (or HPLASTJOB is empty for some other reason) the script reports an error and exits.
- The HPLASTSPID variable contains the spoolfile number (Onnnn) for the $STDLIST spoolfile for the job referenced in the HPLASTJOB variable.
- All output spoolfiles live in @.OUT.HPSPOOL.
- Could be improved by saving the value of HPLASTJOB before setting it to the JOB parameter, and then reinstating this saved value before the script ends.
- Could check for the existence of “!hplastspid.out.hpspool” before trying to print it.