Sample JCL for compiling Enterprise COBOL for z/OS® Version 4 programs

Here is a JCL example for compiling an Enterprise COBOL for z/OS® Version 4 program for use with the IBM® Application Delivery Foundation for z Systems family of products. This sample is a generic sample, and might not meet all your requirements to generate your modules.

Notice that the TEST compiler option is specified. Code the correct suboptions of the TEST compiler option for the version of the compiler that you are using. You can also code any other compatible compiler options that are required by your programs.

Also. notice that a SYSDEBUG DD statement was coded. This statement indicates the source information file that the compiler produces. It refers to a SYSDEBUG library that is a PDS or PDSE. The member name must be the same as the program name.

For Enterprise COBOL for z/OS®, these are the only required changes.

However, there is an optional change in the linkage editor step. The example shows that a special Language Environment® exit module is included in the application load module. Although this is exit module not required, it enables the use of z/OS® Debugger panel 6, which makes the debugger easier to start in some environments. If you prefer to use panel 6 to start z/OS® Debugger, this method is one way to enable it. If you do not plan to use z/OS® Debugger panel 6, then do not include an exit module.

//*     - - -  ADD A JOB CARD ABOVE THIS LINE  - - -
//*
//*  SAMPLE JCL TO PREPARE AN ENTERPRISE COBOL PROGRAM
//*  FOR THE IBM ZSERIES ADFz PRODUCTS:
//*     FAULT ANALYZER, DEBUG TOOL, AND APPLICATION PERF. ANALYZER
//*
//*  NOTES:
//*
//*   COMPILER:
//*    1. A TEST COMPILER PARM IS REQUIRED FOR DEBUG TOOL
//*    2. COMPILER PARM TEST(NOHOOK,SEPARATE,EJPD) HAS ADVANTAGES:
//*         - THE MODULE IS READY FOR DEBUG TOOL
//*         - THE MODULE IS PRODUCTION-READY (NO RUN-TIME OVERHEAD)
//*         - A SYSDEBUG FILE IS CREATED THAT CAN BE USED BY DT,FA,APA
//*    3. COMPILER PARMS LIST,MAP,SOURCE,XREF ARE REQUIRED IF YOU PLAN
//*       TO USE THE COMPILER LISTING WITH FA OR APA, OR 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, AND DB2 TYPE MAIN STORED PROCEDURES.
//*
//*  SET PARMS FOR THIS COMPILE:
//*  ---------------------------
//   SET MEM=SAM1                             PROGRAM NAME
//   SET COBOLLIB='IGY.V4R1.SIGYCOMP'         COBOL COMPILER LOADLIB
//   SET DTLIB='EQAW.SEQAMOD'                 DEBUG TOOL LOADLIB
//   SET LELIB='CEE.SCEELKED'                 LE LINKEDIT LIBRARY
//   SET UNITDEV=SYSALLDA                     UNIT FOR TEMP FILES
//*
//*  ****************************
//*        COMPILE STEP
//*  ****************************
//COMPILE  EXEC PGM=IGYCRCTL,REGION=0M,
//   PARM=('TEST(NOHOOK,SEPARATE,EJPD),LIST,MAP,XREF(SHORT),NONUMBER,SOURCE')
//STEPLIB  DD DISP=SHR,DSN=&COBOLLIB
//SYSIN    DD DISP=SHR,DSN=&SYSUID..ADLAB.SOURCE(&MEM)
//SYSLIB   DD DISP=SHR,DSN=&SYSUID..ADLAB.COPYLIB
//SYSPRINT DD DISP=SHR,DSN=&SYSUID..ADLAB.LISTING(&MEM)
//SYSDEBUG DD DISP=SHR,DSN=&SYSUID..ADLAB.SYSDEBUG(&MEM)
//SYSLIN   DD DISP=(MOD,PASS),DSN=&&LOADSET,UNIT=&UNITDEV,
//            SPACE=(80,(10,10))
//SYSUT1   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT2   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT3   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT4   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT5   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT6   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//SYSUT7   DD SPACE=(80,(10,10),,,ROUND),UNIT=&UNITDEV
//*
//CBLPRINT  EXEC PGM=IEBGENER,REGION=0M
//SYSPRINT  DD SYSOUT=*
//SYSUT1    DD DSN=&SYSUID..ADLAB.LISTING(&MEM),DISP=SHR
//SYSUT2    DD SYSOUT=*
//SYSIN     DD DUMMY
//*  *********************************
//*        LINK-EDIT (BINDER) STEP
//*  *********************************
//LKED EXEC PGM=IEWL,REGION=0M,COND=(5,LT,COMPILE),PARM='LIST,XREF'
//SYSLIB   DD DISP=SHR,DSN=&LELIB
//DTLIB    DD DISP=SHR,DSN=&DTLIB
//SYSLMOD  DD DSN=&SYSUID..ADLAB.LOAD(&MEM),DISP=SHR
//SYSLIN   DD DISP=(OLD,DELETE),DSN=&&LOADSET
//*  INCLUDING A DEBUG TOOL LE EXIT (EQADBCXT, EQADDCXT, EQADICXT, OR EQAD3CXT)
//*  IS OPTIONAL.
//*  AN EXIT ENABLES STARTING DEBUG TOOL USING THE USER EXIT DATA SET UTILITY
//*  (ONE OF THE DEBUG TOOL ISPF UTILITIES)
//*  //        DD *
//*   INCLUDE DTLIB(EQADBCXT)
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD UNIT=&UNITDEV,DCB=BLKSIZE=1024,SPACE=(1024,(200,20))