EMM 1997 INDIETRO

OUTPUT JCL Statement

Original page hosted in Clemson Univ. | Clemson Home |
Clemson Univ. is legitimate propetary of this page, I only put this page in my home for better reference.


The purpose of the OUTPUT JCL statement is to specify processing options for a system ouput (SYSOUT) dataset.

The OUTPUT JCL statement consists of the characters // in the first two columns followed by a name field, the operation (OUTPUT), parameters, and an optional comment.

//name OUTPUT parameter(,parameter)... (comments)

The name field must be coded and must be unique within a job. The parameters are all keyword parameters and are all optional. Examples that follow will demonstrate the use of some of these keyword parameters.

The OUTPUT JCL statement can be placed anywhere after the JOB statement. If it is placed before the first EXEC statement it is a job-level OUTPUT JCL statement and if it is placed after the first EXEC statement it is a step-level OUTPUT JCL statement.

The OUTPUT keyword parameter can be coded on a DD statement containing the SYSOUT keyword parameter, to explicitly reference as many as 128 OUTPUT JCL statements.

//name DD SYSOUT=...,OUTPUT=(reference(,reference))

The reference can be specified; as *.name to refer to an OUTPUT JCL statement in the same step or before the first EXEC; as *.stepname.name to refer an OUTPUT JCL statement in the same step or a previous step; or as *.stepname.procstepname.name to refer to an OUTPUT JCL statement in a cataloged or in-stream procedure.

If a SYSOUT DD statement does not specify the OUTPUT keyword, it can implicitly reference an OUTPUT JCL statement. Step-level OUTPUT JCL statements that specify DEFAULT=YES are implicitly referenced by any SYSOUT DD statements within the same step that do not have the OUTPUT keyword parameter specified. Job-level OUTPUT JCL statements that specify DEFAULT=YES are implicitly referenced by any SYSOUT DD statements within the job that do not have the OUTPUT keyword parameter specified and do not implicitly reference a step-level OUTPUT JCL statement.

The following example demonstrates explicit and implicit references to job-level and step-level OUTPUT JCL statements:

standard job statement

//OUT1   OUTPUT  DEFAULT=YES,... job-level default OUTPUT JCL statement
//OUT2   OUTPUT  ...             job-level OUTPUT JCL statement
//S1     EXEC    ...
//DD1    DD      SYSOUT=A        implicitly references OUT1
//S2     EXEC    ...
//OUT3   OUTPUT  DEFAULT=YES,... step-level default OUTPUT JCL statement
//DD2    DD      SYSOUT=A        implicitly references OUT3
//DD3    DD      SYSOUT=A,       explicitly references OUT1
//               OUTPUT=*.OUT1
//S3     EXEC
//OUT4   OUTPUT  ...             step-level OUTPUT JCL statement
//DD4    DD      SYSOUT=A,       explicitly references OUT4
//               OUTPUT=*.OUT4
//DD5    DD      SYSOUT=A,       explicitly references OUT3
//               OUTPUT=*.S2.OUT3
//S4     EXEC    ...
//OUT5   OUTPUT  DEFAULT=YES,... step-level default OUTPUT JCL statement
//OUT6   OUTPUT  DEFAULT=YES,... second default OUTPUT JCL statement
//DD6    DD      SYSOUT=A        implicitly references OUT5 and OUT6
//DD7    DD      SYSOUT=A,       explicitly references OUT5 and OUT4
//               OUTPUT=(*.OUT5,*.S3.OUT4)

One advantage the OUTPUT JCL statement has over the JES2 /*OUTPUT statement is that the OUTPUT JCL statement is a true JCL statement and not a JES2 control statement. This allows OUTPUT JCL statements to be placed in cataloged procedures. The following example cataloged procedure will print a specified number of copies of a dataset with a specified number of lines on each page:

//PRINT     PROC    DSN=,           dataset name (LRECL=80,RECFM=FB)
//                  COPIES=1,       number of copies
//                  LINECT=55,      lines per page
//                  CONTROL=SINGLE  SINGLE, DOUBLE, or TRIPLE spaced
//PRT       EXEC    PGM=IEBGENER
//OUT1      OUTPUT  COPIES=&COPIES,LINECT=&LINECT,CONTROL=&CONTROL
//SYSPRINT  DD      DUMMY
//SYSIN     DD      DUMMY
//SYSUT1    DD      DSN=&DSN,DISP=SHR
//SYSUT2    DD      SYSOUT=A,OUTPUT=*.OUT1,
//                  DCB=(LRECL=80,RECFM=FB,BLKSIZE=80)

Another advantage that the OUTPUT JCL statement has is that it can be used to process one sysout dataset in many ways. The next example demonstrates how to print one copy of a sysout dataset on special forms at the Information Technology Center while having another copy of the same sysout dataset print at a remote site on regular forms:

//S1    EXEC     ...
//OUT1  OUTPUT   DEST=LOCAL,FORMS=0001
//OUT2  OUTPUT   DEST=SIRRINE
//DD1   DD       SYSOUT=A,OUTPUT=(*.OUT1,*.OUT2)...

The OUTPUT JCL statement can also be used to control a job's system-managed datasets which consist of the Job log, JCL listing, and system messages. The following example shows how to print all of a job's system-managed datasets at destination PAGE:

standard job statement
//OUT1  OUTPUT   DEST=PAGE,JESDS=AL...

The following example shows how to print the JCL listing at POOLE, the system message at PAGE, the job log at LOCAL, and an extra copy of the job log at DANIEL:

standard job statement

//OUT1  OUTPUT   DEST=POOLE,JESDS=JCL
//OUT2  OUTPUT   DEST=PAGE,JESDS=MSG
//OUT3  OUTPUT   DEST=LOCAL,JESDS=LOG
//OUT4  OUTPUT   DEST=DANIEL,JESDS=LOG...

JES2 will automatically group sysout datasets with similar characteristics (output class, destination, process mode, and external writer name) into output groups. Datasets in an output group are processed together at the same location and time.

The GROUPID keyword parameter can be coded on the OUTPUT JCL statement to manually group sysout datasets. In the following example the sysout dataset associated with DD1 will print out under a separate job header whereas the two sysout datasets associated with DD2 and DD3 will print out under the same header:

standard job statement

//OUT1  OUTPUT   GROUPID=group1
//OUT2  OUTPUT   GROUPID=group2
//S1    EXEC     ...
//DD1   DD       SYSOUT=A,OUTPUT=*.OUT1
//DD2   DD       SYSOUT=A,OUTPUT=*.OUT2
//DD3   DD       SYSOUT=A,OUTPUT=*.OUT2...

Certain keyword parameters can be coded on both the OUTPUT JCL statement and the DD statement. A keyword parameter specified on the DD statement overrides the same keyword parameter specified on a referenced OUTPUT JCL statement. In the next example, the DEST=LOCAL parameter in the DD1 DD statement overrides the DEST=SIRRINE parameter in the OUT1 OUTPUT JCL statement:

//S1    EXEC     ...
//OUT1  OUTPUT   FORMS=0001,DEST=SIRRINE
//DD1   DD       SYSOUT=A,            will use forms 0001 and
//               OUTPUT=*.OUT1,       print at destination LOCAL
//               DEST=LOCAL...

Further information about the OUTPUT JCL statement and its associated keyword parameters can be found in the IBM manual MVS/ESA JCL REFERENCE (GC28-1654). A reference copy of this manual is available at the Help Desk in M-4 Martin Hall.




Hosted by www.Geocities.ws

1