You can code a sysout data set disposition that is based on the
success of the job. The OUTDISP parameter of the OUTPUT JCL statement
allows you to specify a normal sysout disposition and an abnormal
sysout disposition. Note that the OUTDISP abnormal sysout disposition
is not supported in an APPC scheduling environment. The system uses
the normal disposition when the job completes successfully. It uses
the abnormal disposition when the job does not complete successfully,
due to a JCL error, an abend, or job termination resulting from a
condition code.
For example, the following statement will cause the system to hold
a sysout data set when the job completes normally or abnormally.
//HELDDS OUTPUT OUTDISP=(HOLD,HOLD)
Coding OUTDISP=(HOLD,HOLD) is equivalent to coding HOLD=YES on
the DD statement.
The OUTDISP parameter allows you to specify the following dispositions
for a sysout data set:
- HOLD allows the system to hold a sysout data set. When the user
or operator releases the data set, the system prints and then purges
it.
- WRITE allows you to print a sysout data set and purge it after
it is printed.
- KEEP allows you to print and keep the sysout data set. After it
is printed, the disposition changes to LEAVE.
- LEAVE allows the system to hold a sysout data set until the user
or operator releases it. When the sysout data set is released, the
disposition changes to KEEP.
- PURGE allows you to delete a sysout data set without printing
it.