OUTPUT
Shows what a job printed to the spool: its log and its results.
Also written OUT
Why it matters. A job gives you no screen of its own. The output is the only way to see what it did and why it failed.
Syntax
{OUTPUT | OUT} jobname[(jobid)] [CLASS(class)] [PRINT(* | dsname)] [KEEP | NOKEEP] [HOLD | NOHOLD] [DELETE]
SDSF (ISPF option S): ST, then S beside the job- jobname(jobid)
- The job. The name must start with your user ID. Add the job number in brackets if two jobs share a name.
- CLASS(class)
- Which held output classes to read.
- PRINT(* | dsname)
- Show the output at the terminal (the default) or write it to a dataset.
- KEEP
- Keep the output in the spool after it is shown. Without it, the output is deleted.
- DELETE
- Delete the held output in those classes without showing it.
- NEWCLASS(class)
- Move the output to another output class.
Try it OUTPUT
- 1
Read everything job CUSTCHK left in the spool.
OUTPUT CUSTCHK - 2
Now show only the job log, JESMSGLG.
OUTPUT CUSTCHK JESMSGLG
Remember
- A job's results are in the spool. OUTPUT reads them.
- JESMSGLG is the log. JESYSMSG holds the step messages.
- Add a part name to see only that part.
The usual mistake
OUTPUT NIGHTBKP
If you have not submitted a job with that name, or it was purged, there is no spool to read. MF/OS says the job was not found.
SUBMIT the job first, then OUTPUT its name
On real z/OS
Real OUTPUT needs a job name that starts with your user ID, prints held output to the terminal, and deletes it afterwards unless you add KEEP. MF/OS prints the parts by name (JESJCL, JESMSGLG, JESYSMSG) under a 'Mainframe101 sim view' heading and deletes nothing. CLASS, PRINT, KEEP and DELETE are not modelled.
Where can I practise OUTPUT?
Right here, at ZedBank. You take a junior job at a simulated bank and use OUTPUT in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- SpoolThe system-managed holding area where job output waits to be read, printed or purged.
- SYSOUTOutput sent to the spool rather than to a dataset, where you can read it after the job finishes.
- SDSFThe tool for looking at what jobs are running, what has finished, and what output they produced.
- JobA unit of batch work submitted to the system, made up of one or more steps that run in order.
- JES2The job entry subsystem: the part of z/OS that queues jobs, decides when they run, and collects their output.
- Return codeA number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.