INCLUDE Statement



The INCLUDE statement allows the specification of additional members to be included, and indicates which library the member resides in.

The DDNAME on the INCLUDE statement is arbitrary, but must match a DD Statement within the HEWL invoking JCL. Using SYSLMOD as the DDNAME is valid if the associated library contains the named members.

Multiple member names, separated by commas. can be included within the parenethesis.

NOTE the use of NCAL in the EXEC statement PARM operand, which turns off AUTOCALL, and helps ensure the required result.




//L        EXEC PGM=HEWL,
//             PARM='MAP,LET,LIST,NCAL',
//             COND=(8,LT,C)
//SYSLIN   DD  DSN=&&OBJ,DISP=(OLD,DELETE)
//         DD  DDNAME=SYSIN
//SYSLMOD  DD  DISP=SHR,DSN=real.livbrary
//*SYSLMOD  DD  DISP=SHR,DSN=real.library(progname)
//SYSUT1   DD  DSN=&&SYSUT1,
//            SPACE-(1024,(120,120),,,ROUND),
//            UNIT=VIO,DCB=BUFNO=1
//SYSPRINT DD  SYSOUT=*
//MYLIB    DD  DISP=SHR,DSN=program.libarary
//SYSIN    DD  *
  ENTRY   start_point
  INCLUDE MYLIB(mainprog)
  NAME    progname


If used, the INCLUDE statement must appear before the NAME Statement.

Copyright © Legac-e Education 2015-