Examples of the SYSOUT parameter
//DD1 DD SYSOUT=P
In this example, the DD statement specifies that JES is to write the sysout data set to the device handling class P output.
//DD2 DD DSNAME=&&PAYOUT1,SYSOUT=P
In this example, DD statement DD2 defines PAYOUT1 as the last qualifier of the system-generated name for the sysout data set. The system generates a name such as userid.jobname.jobid.Ddsnumber.PAYOUT1. The DD statement specifies that JES is to write the data set to the device handling class P output.
//JOB50 JOB ,'C. BROWN',MSGCLASS=C
//STEP1 EXEC PGM=SET
//DDX DD SYSOUT=C
In this example, DD statement DDX specifies that JES is to write the sysout data set to the device handling class C output. Because the SYSOUT parameter and the MSGCLASS parameter specify the same class, the messages from this job and the sysout data set can be written to the same device.
//STEP1 EXEC PGM=ANS
//OT1 OUTPUT DEST=NYC
//OT2 OUTPUT DEST=LAX
//OT3 OUTPUT COPIES=5
//DSA DD SYSOUT=H,OUTPUT=(*.OT2,*.OT1,*.OT3)
- DSA combines with OT1 to send the sysout data set to NYC.
- DSA combines with OT2 to send the sysout data set to LAX.
- DSA combines with OT3 to print five copies of the data set locally on the printer used for output class H.
Note that the output references can be in any order.
//DD5 DD SYSOUT=(F,,2PRT)
In this example, the DD statement specifies that JES is to write the sysout data set to the device handling class F output. The data set is to be printed or punched on forms named 2PRT.