Example - multiple output
//EXAMP JOB MSGCLASS=A
//OUT1 OUTPUT DEFAULT=YES,DEST=COMPLEX7,FORMS=BILLING,
// CHARS=(AOA,AOB),COPIES=2
//OUT2 OUTPUT DEFAULT=YES,DEST=COMPLEX3
//OUT3 OUTPUT DEST=COMPLEX1
//STEP1 EXEC PGM=ORDERS
//OUT4 OUTPUT DEFAULT=YES,DEST=COMPLEX9
//R1 DD SYSOUT=A,OUTPUT=*.OUT3
//R2 DD SYSOUT=A
//STEP2 EXEC PGM=BILLING
//B1 DD SYSOUT=A
//B2 DD SYSOUT=A
This job requests that the system produce nine sets of output:
eight sets of job output and one set for the system-managed output
data set.
- Set 1
- In STEP1, DD statement R1 explicitly references OUTPUT JCL statement OUT3. Therefore, the system produces one set of output at COMPLEX1 for DD statement R1 combined with OUTPUT JCL statement OUT3.
- Set 2
- In STEP1, DD statement R2 implicitly references OUTPUT JCL
statement OUT4 for both of the following reasons:
- DD statement R2 does not contain an OUTPUT parameter.
- STEP1 contains an OUTPUT JCL statement with DEFAULT=YES.
Therefore, the system produces one set of output at COMPLEX9 for DD statement R2 combined with OUTPUT JCL statement OUT4.
- Sets 3 through 8
- In STEP2, DD statements B1 and B2 implicitly reference OUTPUT
JCL statements OUT1 and OUT2 for all of the following reasons:
- DD statements B1 and B2 do not contain OUTPUT parameters.
- STEP2 does not contain an OUTPUT JCL statement with DEFAULT=YES.
- DEFAULT=YES is specified on OUTPUT JCL statements OUT1 and OUT2.
Therefore, the system produces three sets of output each for DD statements B1 and B2:- Sets 3 and 4 at COMPLEX7 for DD statement B1 combined with OUTPUT JCL statement OUT1.
- Set 5 at COMPLEX3 for DD statement B1 combined with OUTPUT JCL statement OUT2.
- Sets 6 and 7 at COMPLEX7 for DD statement B2 combined with OUTPUT JCL statement OUT1.
- Set 8 at COMPLEX3 for DD statement B2 combined with OUTPUT JCL statement OUT2.
- Set 9
- The system-managed output data set is processed locally because of the MSGCLASS parameter on the JOB statement.