MainframeMaster

JCL Tutorial

DEST: JCL Destination Parameter

Progress0 of 0 lessons

What is DEST?

The DEST parameter in JCL specifies the destination for a SYSOUT dataset. It allows you to route job output (like reports or logs) to specific devices, such as printers, remote terminals, or even other user IDs.

DEST is commonly used on DD statements defining SYSOUT datasets (e.g., SYSOUT=*) but can also appear on OUTPUT JCL statements to set default destinations.

Syntax and Usage

Basic Syntax (DD Statement)

jcl
1
//ddname DD SYSOUT=class,DEST=destination

The destination value depends on the type of target device and JES subsystem (JES2 or JES3).

Basic Syntax (OUTPUT Statement)

jcl
1
//outdef OUTPUT DEST=destination

Sets a default destination for SYSOUT datasets referencing this OUTPUT statement.

Common Destination Formats

FormatJESDescriptionExample
nodename.useridJES2/JES3Route to a user ID at a specific node.DEST=NODE1.USER01
useridJES2/JES3Route to a user ID at the local node.DEST=TSU001
Nnnnn | Rmmmm | RMmmmm | RMTmmmmJES2Route to a local (N) or remote (R, RM, RMT) workstation/printer.DEST=N10, DEST=R5
UnnnnJES2Route to a special local device.DEST=U20
(node,userid)JES2Alternative format for node and user ID.DEST=(NODE1,USER01)
devicename | groupnameJES3Route to a specific JES3 device name or group.DEST=PRINTER1
LOCALJES2/JES3Route to any local output device.DEST=LOCAL
nodenameJES2/JES3Route to a specific node (JES selects device).DEST=CENTRAL

Note: Specific formats and device names are installation-dependent. Consult your local documentation.

DEST Parameter Examples

Example 1: Routing Output to a Specific Local Printer (JES2)

jcl
1
//REPORT1 DD SYSOUT=A,DEST=N15

Sends SYSOUT class A output to the local printer defined as N15 in JES2.

Example 2: Routing Output to a Remote User (JES2/JES3)

jcl
1
//NOTIFY DD SYSOUT=*,DEST=REMOTE1.SMITHJ

Sends output (using the job's MSGCLASS) to user SMITHJ at node REMOTE1.

Example 3: Using an OUTPUT Statement (JES2/JES3)

jcl
1
2
3
//PRT1 OUTPUT DEST=DEPTXYZ //RPTA DD SYSOUT=A,OUTPUT=*.PRT1 //RPTB DD SYSOUT=A,OUTPUT=*.PRT1

Defines an OUTPUT statement named PRT1 that defaults the destination to DEPTXYZ. Both RPTA and RPTB SYSOUT datasets will be routed to DEPTXYZ.

Example 4: Routing to a Specific Printer (JES3)

jcl
1
//SYSPRINT DD SYSOUT=P,DEST=PRT42

Sends SYSOUT class P output to the specific JES3 printer named PRT42.

Special Considerations

  • Authorization: Users may require specific authorization (e.g., via RACF) to route output to certain destinations.
  • JES Configuration: Available destinations and their names are defined in the JES2 or JES3 initialization parameters.
  • OUTPUT Statement Precedence: If a DD statement references an OUTPUT statement (via the OUTPUT parameter), the DEST value on the OUTPUT statement overrides any DEST on the DD statement itself, unless the DD statement specifies `DEST=*.`, which would require its own destination.
  • Dynamic Allocation: DEST can also be used with dynamic allocation (SVC 99) to specify a destination for dynamically allocated SYSOUT datasets.

DEST Exercises

Exercise 1: Route to Local User

Write a DD statement to route SYSOUT class X output to your own user ID at the local node.

Exercise 2: Use OUTPUT Statement for Default

Create an OUTPUT JCL statement that sets the default destination to a specific remote printer (e.g., RMT01). Then, create two DD statements that use this OUTPUT statement.

Frequently Asked Questions

What happens if the specified DEST is invalid or unavailable?

The behavior depends on the JES configuration. JES might hold the output in a default queue, reroute it to a default destination, or issue an error message and potentially fail the job step.

Can I route output to multiple destinations?

You cannot specify multiple destinations directly on a single DEST parameter. However, you can achieve this by defining multiple DD statements for the same report, each with a different DEST parameter, or by using OUTPUT JCL statements with multiple copies specified (e.g., using the COPIES parameter on the OUTPUT statement).

How does DEST relate to MSGCLASS on the JOB statement?

MSGCLASS on the JOB statement specifies the output class for job log messages (JESMSGLG, JESJCL, JESYSMSG). DEST on a DD statement specifies the destination for a specific SYSOUT dataset defined within a job step. If a DD statement uses SYSOUT=* (referencing the JOB's MSGCLASS), DEST can override the default destination associated with that MSGCLASS.

Test Your Knowledge

1. What is the primary purpose of the JCL DEST parameter?

  • To specify the dataset name for output
  • To specify the destination for SYSOUT datasets
  • To define the disposition of a dataset
  • To set the output class

2. Which format is commonly used to send output to user TSU123 at node CHICAGO in JES2/JES3?

  • DEST=TSU123/CHICAGO
  • DEST=(TSU123,CHICAGO)
  • DEST=CHICAGO.TSU123
  • DEST=TSU123@CHICAGO

3. On which JCL statement(s) can the DEST parameter be coded?

  • JOB statement only
  • EXEC statement only
  • DD and OUTPUT statements
  • PROC statement only

4. In JES2, what does DEST=R10 typically signify?

  • Route to user R10
  • Route to remote printer/workstation 10
  • Route to region 10
  • Route to storage rack 10

5. If a DD statement has DEST=LOCPRT and also OUTPUT=*.OUT1, and the OUT1 OUTPUT statement has DEST=REMOTE, where will the output go?

  • LOCPRT
  • REMOTE
  • Both LOCPRT and REMOTE
  • The job will fail with an error