SYSOUT Parameter

Purpose

The SYSOUT parameter directs output data to JES (Job Entry Subsystem) managed output devices or output classes. It allows you to route job output to printers, display terminals, other programs, or for storage in the JES spool. SYSOUT is the primary method for creating reports and other printed output in batch jobs.

Syntax

Basic Format

jcl
1
//ddname DD SYSOUT=class

Extended Format

jcl
1
//ddname DD SYSOUT=(class,writer-name,form-name)

With Output Parameters

jcl
1
2
//ddname DD SYSOUT=class, // OUTPUT=reference

With Additional Parameters

jcl
1
2
3
4
//ddname DD SYSOUT=(class,writer-name,form-name), // DEST=destination, // COPIES=number, // DCB=(RECFM=record-format,LRECL=record-length,BLKSIZE=block-size)

Key Parameters

Output Class

The output class determines the processing characteristics of the output and its destination. Classes are single alphanumeric or national characters (A-Z, 0-9, @, #, $).

Common ClassesTypical Use
AStandard printed output
BOutput to be held for later viewing or printing
XOutput to be purged immediately (often used for test jobs)
ZHeld output with SYSOUT=* access for TSO users

Note: Actual class assignments are installation-dependent and may vary. Check with your systems programmer for specific class assignments at your installation.

Writer Name

  • Specifies an external writer program that processes the output data set
  • Can be 1-8 alphanumeric or national characters
  • Used for special formatting or routing of output
  • Omitted if standard JES processing is sufficient
  • Example: SYSOUT=(A,INTRDR) - routes output to the internal reader

Form Name

  • Specifies the form to be used when printing the output
  • Can be 1-4 alphanumeric characters
  • Used for special forms like preprinted invoices, checks, or multipart forms
  • Omitted if standard forms are sufficient
  • Example: SYSOUT=(A,,STD1) - prints on form STD1

DEST (Destination)

  • Specifies a remote destination for the output
  • Can be a remote workstation, node, or user ID
  • Format varies by JES version and network configuration
  • Examples:
    • DEST=R5 - sends to remote workstation 5
    • DEST=NYC - sends to the node named NYC
    • DEST=USERID - sends to a specific user
    • DEST=NYC.USER1 - sends to USER1 at node NYC

COPIES

  • Specifies the number of copies to be printed
  • Value can be 1-255 (default is 1)
  • Example: COPIES=3 - prints three copies

OUTPUT

  • References an OUTPUT JCL statement with additional processing parameters
  • Allows for more detailed control over output formatting and processing
  • Can reference multiple OUTPUT statements
  • Examples:
    • OUTPUT=*.STEP1.OUT1 - references the OUT1 OUTPUT statement in STEP1
    • OUTPUT=(*.OUT1,*.OUT2) - references two OUTPUT statements

Special Values

SYSOUT=*

Uses the MSGCLASS value from the JOB statement as the output class. This is useful for ensuring that all job output goes to the same class.

jcl
1
//REPORT DD SYSOUT=*

SYSOUT=*-MSGCLASS

A variation of SYSOUT=* that subtracts one from the MSGCLASS value. If MSGCLASS=A, this would be equivalent to SYSOUT=9. This is rarely used in modern JCL.

SPIN=UNALLOC

Used with SYSOUT to make output available for viewing or printing as soon as the DD statement is closed, rather than waiting for the job to complete.

jcl
1
//EARLY DD SYSOUT=A,SPIN=UNALLOC

DCB Considerations

The DCB parameter can be used with SYSOUT to specify record format, record length, and block size. Common values for print files:

jcl
1
2
//REPORT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=6650)
  • RECFM=FBA - Fixed length records with ANSI carriage control
  • LRECL=133 - 133-byte logical records (132 data bytes plus 1 carriage control byte)
  • BLKSIZE=6650 - Block size that can hold 50 records per block

Common Examples

Basic Print Output

jcl
1
//REPORT DD SYSOUT=A

Directs output to class A, typically for printing

Multiple Copies

jcl
1
//INVOICE DD SYSOUT=A,COPIES=3

Prints three copies of the output

Special Form

jcl
1
//CHECKS DD SYSOUT=(A,,CHECK)

Prints output on the CHECK form

External Writer

jcl
1
//AFP DD SYSOUT=(A,AFPDS)

Routes output to the AFPDS writer for Advanced Function Presentation printing

Remote Destination

jcl
1
//REMOTE DD SYSOUT=A,DEST=BRANCH5

Sends output to the BRANCH5 destination

Held Output

jcl
1
//HOLD DD SYSOUT=(H,,)

Sends output to class H, which is typically held for later processing

With OUTPUT Reference

jcl
1
2
3
4
//STEP1 EXEC PGM=MYPROG //LAYOUT OUTPUT PAGEDEF=P1A4,FORMDEF=F1A4, // CHARS=GT12 //REPORT DD SYSOUT=A,OUTPUT=*.LAYOUT

Uses the LAYOUT OUTPUT statement to specify formatting parameters for the REPORT output

Internal Reader

jcl
1
//SUBJOB DD SYSOUT=(A,INTRDR)

Routes output to the internal reader, effectively submitting it as a new job

SYSOUT vs. DSN

The SYSOUT parameter is an alternative to specifying a data set name (DSN). When SYSOUT is used, JES manages the output as a temporary spool data set. Compare these two approaches:

Using SYSOUTUsing DSN
jcl
1
//RPT DD SYSOUT=A
jcl
1
2
3
4
//RPT DD DSN=USER.REPORT, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(1,1)), // DCB=(RECFM=FBA,LRECL=133)
  • Managed by JES
  • Temporary - purged after printing
  • Can be viewed in spool
  • No SPACE parameter needed
  • Permanent data set
  • Must be explicitly allocated
  • Requires SPACE parameter
  • Must be explicitly printed later

Best Practices

  1. Use appropriate output classes for different types of output (print, hold, etc.)
  2. Consider SYSOUT=* to match MSGCLASS for related output
  3. Use OUTPUT statements for complex formatting requirements
  4. Specify DCB parameters appropriate for the output format
  5. Use remote destinations carefully to avoid routing output to incorrect locations
  6. Consider COPIES parameter rather than generating multiple copies programmatically

Related Concepts