Sample JCL for compiling Enterprise PL/I for z/OS® Version 3.4 or earlier programs

Here is a JCL example for compiling an Enterprise PL/I for z/OS® Version 3.4 or earlier program for use with the ADFz family of products.

//*     - - -  ADD A JOB CARD ABOVE THIS LINE  - - -
//*
//*  SAMPLE JCL TO COMPILE WITH ENTERPRISE PLI V3.4 AND PREVIOUS
//*  FOR THE IBM ZSERIES ADFz PRODUCTS:
//*     FAULT ANALYZER, DEBUG TOOL, AND APPLICATION PERF. ANALYZER
//*
//*  NOTES:
//*
//*   COMPILER:
//*    1. A 2-STAGE COMPILE IS PERFORMED.  STAGE 1 (PREPROCESS) IS
//*       DONE TO EXPAND INCLUDES AND MACROS IN THE PROGRAM, SO THAT
//*       A SOURCE FILE IS CREATED FOR DEBUG TOOL THAT HAS ALL STMTS.
//*    2. COMPILER PARM TEST AND NOPT ARE REQUIRED FOR DEBUG TOOL
//*    3. COMPILER PARMS AGGREGATE,ATTRIBUTES(FULL),NOBLKOFF,LIST,
//*       MAP,NEST,NONUMBER,OPTIONS,SOURCE,STMT,XREF(FULL) ARE NEEDED
//*       TO PROCESS THE COMPILER LISTING WITH IPVLANGX
//*
//*   BINDER (LINKAGE EDITOR):
//*    4. THE INCLUDE FOR MODULE EQAD?CXT IS OPTIONAL.  IT IS AN
//*       LE EXIT MODULE THAT CAN BE USED TO START DEBUG TOOL.
//*       UNDERSTAND THE METHODS AVAILABLE FOR STARTING DEBUG TOOL,
//*       AND CHOOSE WHETHER YOU WANT TO USE THE LE EXITS.
//*         IF YOU USE THIS METHOD, LOAD THE CORRECT EXIT MODULE:
//*            EQADBCXT: FOR BATCH PROGRAMS
//*            EQADICXT: FOR ONLINE IMS PROGRAMS
//*            EQADDCXT: FOR DB2 STORED PROCEDURES (OF TYPE MAIN AND SUB)
//*           (for SUB this is supported only for invocations through call_sub)
//*            (DO NOT INCLUDE AN EXIT FOR CICS PROGRAMS)
//*     YOU CAN ALSO USE MODULE EQAD3CXT FOR BATCH PROGRAMS, ONLINE IMS
//*          PROGRAMS, DB2 TYPE MAIN STORED PROCEDURES.
//*
//*  SET PARMS FOR THIS COMPILE:
//*  ---------------------------
//   SET MEM=PTEST                        PROGRAM NAME
//   SET PLICOMP='IBMZ.V3R4.SIBMZCMP'     PLI COMPILER LOADLIB
//   SET DTLIB='EQAW.SEQAMOD'             DEBUG TOOL LOADLIB
//   SET LEHLQ='CEE'                      LE HIGH LVL QUALIFIER
//   SET UNITDEV=SYSALLDA                 UNIT FOR TEMP FILES
//   SET LANGX='IPVLANGX'                 IPVLANGX UTILITY PROGRAM
//   SET LANGXLIB='IPV.SIPVMODA'          LIBRARY FOR IPVLANGX UTILITY
//*    NOTE: USE THE IPVLANGX FACILITY SHIPPED WITH THE COMMON COMPONENT.
//*
//ALLOCOBJ EXEC PGM=IEFBR14              ALLOC OBJ LIB IF NEEDED
//XSOURCE DD DSN=&SYSUID..ADLAB.EXPANDED.SOURCE,SPACE=(CYL,(3,1,15)),
//  DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=8000,DISP=(MOD,CATLG)
//OBJ   DD DSN=&SYSUID..ADLAB.OBJ,SPACE=(CYL,(3,1,15)),
//  DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=8000,DISP=(MOD,CATLG)
//*  ***************************************
//*     PREPROCESS STEP (COMPILE STAGE 1)
//*  ***************************************
//PRECOMP  EXEC PGM=IBMZPLI,REGION=0M,
//   PARM=('MACRO,MDECK,NOCOMPILE,NOSYNTAX,INSOURCE')
//STEPLIB  DD   DSN=&PLICOMP,DISP=SHR
//         DD   DSN=&LEHLQ..SCEERUN,DISP=SHR
//SYSIN    DD   DISP=SHR,DSN=&SYSUID..ADLAB.SOURCE(&MEM)
//SYSLIB   DD   DISP=SHR,DSN=&SYSUID..ADLAB.COPYLIB
//SYSPRINT DD   SYSOUT=*
//SYSUT1   DD   SPACE=(1024,(200,50),,CONTIG,ROUND),DCB=BLKSIZE=1024,
//             UNIT=&UNITDEV
//SYSPUNCH DD DISP=SHR,DSN=&SYSUID..ADLAB.EXPANDED.SOURCE(&MEM)
//*
//*  ***************************************
//*     COMPILE STEP (COMPILE STAGE 2)
//*  ***************************************
//COMPILE EXEC PGM=IBMZPLI,REGION=0M,                                
// PARM=('+DD:OPTIONS')                                              
//* THE +DD:OPTIONS PARAMETER IS USED TO DIRECT THE COMPILER TO      
//* GET THE COMPILATION OPTIONS FROM THE OPTIONS DD STATEMENT        
//OPTIONS  DD *                                                      
TEST(ALL),LIST,MAP,SOURCE,XREF(FULL),
NOBLKOFF,AGGREGATE,ATTRIBUTES(FULL),NEST,OPTIONS,NOPT,
STMT,NONUMBER,OFFSET
/*
//STEPLIB  DD DSN=&PLICOMP,DISP=SHR
//         DD DSN=&LEHLQ..SCEERUN,DISP=SHR
//SYSIN    DD DISP=SHR,DSN=&SYSUID..ADLAB.EXPANDED.SOURCE(&MEM)
//SYSLIB   DD DISP=SHR,DSN=&SYSUID..ADLAB.COPYLIB
//SYSPRINT DD DISP=SHR,DSN=&SYSUID..ADLAB.ENTPLI.LISTING(&MEM)
//SYSUT1   DD SPACE=(CYL,(5,2),,CONTIG),DCB=BLKSIZE=1024,UNIT=&UNITDEV
//SYSLIN   DD DSN=&SYSUID..ADLAB.OBJ(&MEM),DISP=SHR
//*
//PLIPRINT  EXEC PGM=IEBGENER,REGION=0M
//SYSPRINT  DD SYSOUT=*
//SYSUT1    DD DSN=&SYSUID..ADLAB.ENTPLI.LISTING(&MEM),DISP=SHR
//SYSUT2    DD SYSOUT=*
//SYSIN     DD DUMMY
//*
//*  *********************************
//*     STEP TO GENERATE LANGX FILE
//*  *********************************
//LANGX    EXEC PGM=&LANGX,REGION=32M,
//  PARM='(PLI ERROR 64K CREF'
//STEPLIB  DD DISP=SHR,DSN=&LANGXLIB
//         DD DISP=SHR,DSN=&LEHLQ..SCEERUN
//LISTING  DD DSN=&SYSUID..ADLAB.ENTPLI.LISTING(&MEM),DISP=SHR
//IDILANGX DD DISP=SHR,DSN=&SYSUID..ADLAB.EQALANGX(&MEM)
//*
//* *********************************
//* LINK-EDIT (BINDER) STEP
//* *********************************
//LINK EXEC PGM=IEWL,PARM=(LET,MAP,LIST),REGION=0M
//SYSLIB DD DSN=&LEHLQ..SCEELKED,DISP=SHR
//DTLIB DD DSN=&DTLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DISP=SHR,DSN=&SYSUID..ADLAB.LOAD(&MEM)
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSLIN DD DSN=&SYSUID..ADLAB.OBJ(&MEM),DISP=(OLD,PASS)
//*  INCLUDING A DEBUG TOOL LE EXIT (EQADBCXT, EQADDCXT, EQADICXT OR EQAD3CXT)
//*  IS OPTIONAL.  THE EXIT ENABLES STARTING DEBUG TOOL WITH THE
//*  USER EXIT DATA SET UTILITY (ONE OF THE DEBUG TOOL ISPF UTILITIES)
//*  //        DD *
//*   INCLUDE DTLIB(EQADBCXT)