OUTPUT JCL statement - IBM-JCL

1.Syntax

//name OUTPUT parameter[,parameter]... [comments]

The OUTPUT JCL statement consists of the characters // in columns 1 and 2 and four fields: name, operation (OUTPUT), parameter, and comments.

2.Name Field
Code a name in the name field of every OUTPUT JCL statement, as follows:

  • Each job-level OUTPUT JCL name must be unique within a job.
  • Each step-level OUTPUT JCL name must be unique within the same job step.
  • The name must begin in column 3.
  • The name is 1 through 8 alphanumeric or national ($, #, @) characters.
  • The first character must be alphabetic or national ($, #, @).
  • The name must be followed by at least one blank.

3.Operation Field
The operation field consists of the characters OUTPUT and must be preceded and followed by at least one blank. It can begin in any column.

4.Parameter Field
The OUTPUT JCL statement contains only keyword parameters. All parameters are optional; however, do not leave the parameter field blank. You can code any of the keyword parameters in any order in the parameter field.

Parameter Field

Default OUTPUT JCL Statement
An OUTPUT JCL statement that contains a DEFAULT=YES parameter is called a default OUTPUT JCL statement.

5.Comments Field
The comments field follows the parameter field after at least one intervening blank.

6.Location in the JCL

References by Sysout DD Statements

An OUTPUT JCL statement can be referenced by a sysout DD statement in two ways:

  • Explicitly. The sysout DD statement contains an OUTPUT parameter that specifies the name of the OUTPUT JCL statement.You must place the OUTPUT JCL statement in the input stream before any sysout DD statement that refers to it.
  • Implicitly. The sysout DD statement does not contain an OUTPUT parameter. Implicit references are to default OUTPUT JCL statements. The sysout DD statement implicitly references all step-level default OUTPUT JCL statements in the same step.

Note: If the sysout DD statement does not contain an OUTPUT parameter and the job or step does not contain a default OUTPUT JCL statement, processing of the sysout data set is controlled only by the DD statement, a JES2 /*OUTPUT statement or a JES3 //*FORMAT statement, and appropriate installation defaults.

Job-Level OUTPUT JCL Statements

This statement appears after the JOB statement and before the first EXEC statement. It cannot be used for a started procedure.

Step-Level OUTPUT JCL Statements

This statement appears in a step, that is, anywhere after the first EXEC statement in a job, except within a concatenated DD statement.

Location of Default OUTPUT JCL Statements

Where you place default OUTPUT JCL statements determines to which statements a sysout DD statement implicitly refers. A sysout DD statement implicitly references all job-level default OUTPUT JCL statements when the step containing the DD statement does not contain any step-level default OUTPUT JCL statements.

You can place more than one job- or step-level default OUTPUT JCL statement in a job or step.

OUTPUT JCL Statement with JESDS Parameter

Place an OUTPUT JCL statement with a JESDS parameter after the JOB statement and before the first EXEC statement.

OUTPUT JCL Statements in Cataloged or In-Stream Procedures

OUTPUT JCL statements can appear in procedure steps. The referencing DD statement can appear later in the procedure, in the calling job step, or in a later step in the job.

An OUTPUT JCL statement must not be placed before the first EXEC statement in a procedure; for this reason, procedures cannot contain job-level OUTPUT JCL statements or OUTPUT JCL statements with JESDS parameters.

A procedure DD statement can refer to an OUTPUT JCL statement in an earlier job step or to a job-level OUTPUT JCL statement. However, a procedure DD statement cannot refer to an OUTPUT JCL statement in the calling step.

Table: Job- and Step-Level OUTPUT JCL Statements in the JCL

7.Overrides

  • Parameters on a sysout DD statement override corresponding parameters on an OUTPUT JCL statement.
  • Parameters that appear only on the sysout DD statement or only on the OUTPUT JCL statement are used by JES in processing the data set.

8.Relationship to Sysout DD Statement
Do not refer to an OUTPUT JCL statement in a sysout DD statement that defines a JES internal reader. Such a DD statement contains an INTRDR subparameter in the SYSOUT parameter.

9.Relationship to the JES2 /*OUTPUT Statement
JES2 ignores a JES2 /*OUTPUT statement when either of the following appears in the same job or step:

  • A default OUTPUT JCL statement implicitly referenced by the sysout DD statement.
  • An OUTPUT JCL statement explicitly referenced by the OUTPUT parameter of the sysout DD statement.

In this case, JES2 uses the third positional subparameter of the DD SYSOUT parameter as a form name, and not as a reference to a JES2 /*OUTPUT statement.

10.Relationship to the JES3 //*FORMAT Statement

  • When a sysout DD statement implicitly or explicitly references an OUTPUT JCL statement, JES3 ignores any default JES3 //*FORMAT statements in the job. A default //*FORMAT statement contains a DDNAME=, parameter.
  • When a JES3 //*FORMAT statement contains a DDNAME parameter that explicitly references a sysout DD statement, JES3 ignores any default OUTPUT JCL statements in the job.
  • JES3 uses the processing options from both a JES3 //*FORMAT statement and an OUTPUT JCL statement in a job when (1) the //*FORMAT statement DDNAME parameter names a sysout DD statement and (2) the sysout DD statement’s OUTPUT parameter names an OUTPUT JCL statement. Two separate sets of output are created from the data set defined by the sysout DD statement:
  • – One processed according to the options on the JES3 //*FORMAT statement combined with the sysout DD statement.
    – One processed according to the options on the OUTPUT JCL statement combined with the sysout DD statement.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-JCL Topics