z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Location in the JCL

z/OS MVS JCL Reference
SA23-1385-00

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 1. Job- and Step-Level OUTPUT JCL Statements in the JCL
Job/Step Statement Description

Job in Input Stream
 

//jobname JOB    ...
//name    OUTPUT ...

 
Job-level OUTPUT JCL statement

Step 1

//STEP1   EXEC PGM=X
//name    OUTPUT ...
//DD1     DD     ...
//DD2     DD     ...
//DD3     DD     ...

 
Step-level OUTPUT JCL statement for STEP1

Step 2

//STEP2   EXEC PROC=A
//name    OUTPUT ...
//DD1     DD     ...
//DD2     DD     ...
//DD3     DD     ...

 
Step-level OUTPUT JCL statement for STEP2

Procedure A in
SYS1.PROCLIB
Procedure Step 1

 
//        PROC   ...
//PSTEP1  EXEC PGM=G
//name    OUTPUT ...
//DD4     DD     ...
//DD5     DD     ...
//DD6     DD     ...

 
 
Step-level OUTPUT JCL statement for PSTEP1

Procedure Step 2

//PSTEP2  EXEC PGM=H
//name    OUTPUT ...
//DD7     DD     ...
//DD8     DD     ...
//DD9     DD     ...

 
Step-level OUTPUT JCL statement for PSTEP2

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014