SYSOUT DD Statement


The SYSOUT DD statement is used to specify where to route the output produced by a job step. It defines the destination for the output, which can include printing on paper, writing to a dataset, or discarding the output.

Syntax -

//SYSOUT  DD destination-information
  • //SYSOUT - is the DD statement label, which uniquely identifies the output definition.
  • destination-information - specifies the destination for the output. This can include parameters that control the destination and characteristics of the output.
    • SYSOUT=* - Send the output to the system operator's console.
    • SYSOUT=printer-name - Send the output to a specific printer identified by its name.
    • DSN=dataset-name - Write the output to a dataset with the specified name.
Note! Multiple datasets is not allowed with the SYSOUT DD statement.

Examples -


Scenario - Writing to spool.

//TESTJOB JOB ...
//STEP1    EXEC PGM=PROG1
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
...

In this example, any standard output produced by the job step will be displayed on the spool.