Sample JCL for compiling Enterprise PL/I Version 3.5 or Version 3.6 programs

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

//*     - - -  ADD A JOB CARD ABOVE THIS LINE  - - -
//*
//* SAMPLE JCL TO PREPARE AN ENTERPRISE PL/I V3.5 OR
//* ENTERPRISE PL/I V3.6 PROGRAM FOR THE IBM ZSERIES
//* 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
//*    THE SYSDEBUG FILE CREATED IN STAGE 2 (COMPILE) HAS ALL STMTS.
//* 2. COMPILER PARMS TEST AND NOPT ARE REQUIRED FOR DEBUG TOOL
//* 3. COMPILER PARM TEST(ALL,SYM,NOHOOK,SEP) (V3.5) OR
//*    TEST(ALL,SYM,NOHOOK,SEP,SEPNAME) (V3.6) IS USED BECAUSE:
//*    - THE MODULE IS READY FOR DEBUG TOOL
//*         - NOHOOK DOES NOT HAVE RUN-TIME CPU OVERHEAD. HOWEVER, THE
//*           MODULE IS LARGER BECAUSE OF STATEMENT TABLE
//*         - A SYSDEBUG FILE IS CREATED THAT CAN BE USED BY DT,FA,APA
//*    4. 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):
//*    5. 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=PADSTAT                      PROGRAM NAME
//   SET PLICOMP='IBMZ.V3R5.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
//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=(MOD,PASS),DSN=&&SRC1,UNIT=&UNITDEV,
//            SPACE=(80,(10,10))
//*
//*  ***************************************
//* 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,SYM,NOHOOK,SEPARATE),LIST,MAP,SOURCE,XREF(FULL),
NOBLKOFF,AGGREGATE,ATTRIBUTES(FULL),NEST,OPTIONS,NOPT,
STMT,NONUMBER,OFFSET
/*
//*  Note: The above options are for Enterprise PL/I Version 3.5
//*        For Enterprise PL/I Version 3.6, change the TEST option
//*        to:  TEST(ALL,SYM,NOHOOK,SEPARATE,SEPNAME)
//STEPLIB  DD DSN=&PLICOMP,DISP=SHR
//         DD DSN=&LEHLQ..SCEERUN,DISP=SHR
//SYSIN    DD DSN=&&SRC1,DISP=(OLD,PASS)
//SYSLIB   DD DISP=SHR,DSN=&SYSUID..ADLAB.COPYLIB
//SYSPRINT DD DISP=SHR,DSN=&SYSUID..ADLAB.ENTPLI.LISTING(&MEM)
//SYSDEBUG DD DISP=SHR,DSN=&SYSUID..ADLAB.SYSDEBUG(&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)