If you are currently using the TEST option to compile your programs, consider using NOTEST. Using NOTEST allows you to take advantage of Debug Tool for z/OS functionality that is not available when compiling with the TEST option. Examples of Debug Tool for z/OS functions that are available when compiling with the NOTEST option include the automonitor feature and using AT ENTRY program name breakpoints. Compiling with NOTEST also allows you to generate a module that can be debugged but does not incur additional overhead when running without the debugger.
The following table shows various compiler options that can be used to prepare VS COBOL II programs for use with the IBM Problem Determination Tools products (Debug Tool for z/OS, Fault Analyzer for z/OS and Application Performance Analyzer for z/OS). The methods suggested in the following table indicate if the load module produced is suitable for a production environment. Load modules suitable for a production environments have no significant run-time overhead.
Compiler options | Source information file type produced | Is the load module production ready? | Options supported and suggested for Debug Tool for z/OS | Options supported and suggested for Fault Analyzer for z/OS | Options supported and suggested for Application Performance Analyzer for z/OS |
---|---|---|---|---|---|
NOTEST, LIST, MAP, SOURCE, XREF, NONUMBER, NOOFFSET | Compiler listing | Yes | N/A | Supported | Supported |
NOTEST, LIST, MAP, SOURCE, XREF, NUMBER | Yes | N/A | Supported | N/A | |
NOTEST, LIST, MAP, NOOPT, SOURCE, XREF, NONUMBER | LANGX file | Yes | Suggested for production and test |
Perform the following steps for compiling your VS COBOL II programs using the compiler options suggested in Table 6:
Below is an example of JCL for compiling a VS COBOL II program for use with IBM Problem Determination Tools products. This is a generic sample, and might not meet all your requirements.
Notice the compiler options used and notice that the compiler listing is passed to an added step that generates a LANGX file. The compiler listing can be stored in a permanent file or can be passed in a temporary file. For VS COBOL II, these are the only required changes.
However, there is an optional change in the linkage editor step. The following example includes a special Language Environment exit module in the application load module. Although this is not required, it enables the use of Debug Tool panel 6, which makes the debugger easier to start in some environments. If you prefer to use panel 6 to start Debug Tool, this is one way to enable it. If you do not plan to use Debug Tool panel 6, then do not include an exit module. Do not include the exit module for CICS programs or if the module is not linked with Language Environment services (it is linked with COBOL II runtime services).
//* - - - ADD A JOB CARD ABOVE THIS LINE - - -
//*
//* SAMPLE JCL TO PREPARE A VS COBOL II PROGRAM
//* FOR THE IBM ZSERIES PD TOOLS PRODUCTS:
//* FAULT ANALYZER, DEBUG TOOL, AND APPLICATION PERF. ANALYZER
//*
//* NOTES:
//*
//* COMPILER:
//* 1. COMPILER OPTIONS LIST,MAP,SOURCE,XREF ARE REQUIRED IF YOU
//* PLAN TO USE THE LISTING WITH A PD TOOLS PRODUCT, OR TO
//* PROCESS THE LISTING WITH AN XXXLANGX UTILITY
//* 2. COMPILER OPTION NOTEST IS SUGGESTED FOR ALL COBOL II
//* PROGRAMS, EVEN IF IBM DEBUG TOOL FOR Z/OS WILL BE USED
//*
//* BINDER (LINKAGE EDITOR):
//* 3. IN THIS EXAMPLE, THE MODULE IS LINKED WITH LANGUAGE
//* ENVIRONMENT RUNTIME SERVICES. THIS IS CONTROLLED BY THE
//* LIBRARY OR LIBRARIES SPECIFIED IN THE SYSLIB DD IN THE
//* BINDER STEP.
//* 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, OR FOR
//* PROGRAMS LINKED WITH THE COBOL II RUNTIME SERVICES
//* INSTEAD OF LANGUAGE ENVIRONMENT RUNTIME SERVICES)
//*
//* SET OPTIONS FOR THIS COMPILE:
//* ---------------------------
// SET MEM=SAMII1 PROGRAM NAME
// SET COB2COMP='IGY.V1R4M0.COB2COMP' COBOL II COMPILER LIB
// SET DTLIB='EQAW.SEQAMOD' DEBUG TOOL LOADLIB
// SET LELKED='CEE.SCEELKED' LE LINK LIBRARY
// SET LELIB='CEE.SCEERUN' LE RUNTIME LIBRARY
// SET UNITDEV=SYSALLDA TEMP DATASET UNIT
// SET LANGX='EQALANGX' XXXLANGX UTILITY PROGRAM
// SET LANGXLIB='EQAW.SEQAMOD' LIB FOR XXXLANGX UTILITY
//*
//* ****************************
//* COMPILE STEP
//* ****************************
//COMPILE EXEC PGM=IGYCRCTL,REGION=4M,
// PARM=('NOTEST,LIST,MAP,NOOPT,SOURCE,XREF,NONUMBER',
// 'RES,APOST,LIB,DYNAM,NORENT,NOSSRANGE')
//STEPLIB DD DISP=SHR,DSN=&COB2COMP
//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)
//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
//*
//* *********************************
//* STEP TO GENERATE A LANGX FILE
//* *********************************
//LANGX EXEC PGM=&LANGX,REGION=32M,
// PARM='(COBOL ERROR 64K CREF'
//STEPLIB DD DISP=SHR,DSN=&LANGXLIB
// DD DISP=SHR,DSN=&LELIB
//LISTING DD DSN=&SYSUID..ADLAB.LISTING(&MEM),DISP=SHR
//IDILANGX DD DISP=SHR,DSN=&SYSUID..ADLAB.EQALANGX(&MEM)
//*
//* *********************************
//* LINK-EDIT (BINDER) STEP
//* *********************************
//LKED EXEC PGM=IEWL,REGION=0M,COND=(5,LT,COMPILE),PARM='LIST,XREF'
//SYSLIB DD DISP=SHR,DSN=&LELKED
//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, OR EQADICXT) 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))
[ Top of Page | Previous Page | Next Page | Contents | Index ]