JCL Include Statement Real Usage

In addition to or in conjunction with a JCL procedure, you can use an INCLUDE statement to copy text directly into your job stream. Then, when the job is submitted, the INCLUDE group replaces the INCLUDE statement, and the system processes the embedded text as part of the job stream.

JCL INCLUDE

The INCLUDE statement works much like a cataloged procedure, except that the JCL copied into the job stream doesn’t have to consist of entire job steps. As a result, you can use INCLUDE to copy just portions of a step, such as a single DD statement or a group of commonly used DD statements.

Syntax for INCLUDE

The JCL submitted for processing

//MM01RN   JOB  (36512),'R MENENDEZ',NOTIFY=MM01
//         JCLLIB ORDER=MMA2.PROCLIB
//INV3010  EXEC PGM=INV3010
//SYSOUT   DD   SYSOUT=*
//         INCLUDE INVMAST
//INVSEL   DD   DSNAME=&&INVSEL,DISP=(NEW,PASS),
//             UNIT=SYSDA,SPACE=(CYL,(20,10))
//SELCTL   DD   DUMMY
//INV3020  EXEC PGM=INV3020
//SYSOUT   DD   SYSOUT=*
//INVMAST  DD   DSNAME=&&INVSEL,DISP=(OLD,DELETE)
//INVSLST  DD   SYSOUT=*

Latest Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.