Application Performance Analyzer for z/OS, Version 11.1, User's Guide

Enterprise COBOL for z/OS Version 3 and COBOL for OS/390 and VM programs

The following table shows various compiler options that can be used to prepare Enterprise COBOL for z/OS Version 3 and COBOL for OS/390 and VM 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 runtime overhead.

Table 4. Examples of compiler options and source information files supported by IBM Problem Determination tools products for Enterprise COBOL for z/OS Version 3 and COBOL for OS/390 and VM
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
TEST(NONE, SYM, SEPARATE), LIST, MAP, SOURCE, NONUMBER, XREF(SHORT) SYSDEBUG Yes Suggested for production and test
NOTEST, LIST, MAP, SOURCE, NONUMBER, NOOPT, XREF(SHORT) Compiler listing Yes N/A Supported Supported
NOTEST, LIST, MAP, SOURCE, XREF(SHORT), NUMBER Yes N/A Supported N/A
LIST, MAP, SOURCE, NONUMBER, XREF(SHORT) LANGX file Yes N/A Supported Supported
Note:
The highlighted row or rows in the table above indicate the suggested compiler options and source information file types for each product.

Preparing Enterprise COBOL for z/OS Version 3 and COBOL for OS/390 and VM programs

Perform the following steps for compiling your Enterprise COBOL for z/OS Version 3 and COBOL for OS/390 and VM programs using the compiler options suggested in Table 4:

  1. Create libraries (PDSE is suggested unless PDS is required in your organization) for SYSDEBUG files. Allocate one or more SYSDEBUG libraries for each environment, such as test, production, and so on.
  2. Create a corresponding SYSDEBUG library for each load library. Specify LRECL=(80 to 1024),RECFM=FB,BLKSIZE=(multiple of lrecl < 32K).
  3. For all programs in both test and production environments, use TEST(NONE,SYM,SEPARATE),LIST,MAP,SOURCE,NONUMBER,XREF(SHORT).

    TEST is required by Debug Tool for z/OS.

    The SEPARATE sub-option produces a SYSDEBUG file. Specifying NONE with SEPARATE produces a production-ready module that can still be debugged.

    If OPTIMIZE is specified, the debugger JUMPTO and GOTO commands are disabled. These commands are enabled when NOOPTIMIZE is specified.

  4. The LIST, MAP, SOURCE, and XREF options are needed only if a compiler listing or a LANGX file will be used to provide source information to Fault Analyzer for z/OS or Application Performance Analyzer for z/OS. If a SYSDEBUG file will be used with these products, or if you will not be using Fault Analyzer for z/OS or Application Performance Analyzer for z/OS, the LIST, MAP, SOURCE, and XREF options are optional.
  5. The NONUMBER compiler option is needed only if a compiler listing file will be used to provide source information to Application Performance Analyzer for z/OS. If a SYSDEBUG file will be used with Application Performance Analyzer for z/OS, or if you will not be using Application Performance Analyzer for z/OS, the NONUMBER option is optional.
  6. Code a SYSDEBUG DD in the JCL of the compiler step.
    //SYSDEBUG DD DSN= SYSDEBUG.pds(pgmname),DISP=SHR
    Save the SYSDEBUG file produced by the compiler in the SYSDEBUG library and specify a member name that is equal to the program name of your application program. This is the source information file for Debug Tool for z/OS, Fault Analyzer for z/OS and Application Performance Analyzer for z/OS.
  7. Modify the promotion process to promote SYSDEBUG files. When a load module is promoted, for example from test to production, promote the corresponding SYSDEBUG file or files. A promotion can be a recompile, copy, or move. Perform the same steps with the SYSDEBUG file that you perform with the module during promotion.
  8. Optionally, include a Debug Tool Language Environment exit module into the load module during the linkage editor step. This is one way to enable Debug Tool's panel 6 in ISPF, a simple panel-driven method to start the debugger automatically when a program runs, without JCL changes, based on the program name and user ID. Use module EQADBCXT for batch programs (including IMS batch), EQADICXT for IMS/TM programs and EQADDCXT for DB2 stored procedures. Do not include the exit module for CICS programs.

Sample JCL for compiling Enterprise COBOL for z/OS Version 3 programs

Below is a JCL example for compiling an Enterprise COBOL for z/OS Version 3 program for use with the IBM Problem Determination Tools products. This is a generic sample, and might not meet all your requirements.

Notice that a TEST option is specified. Code the correct sub-option 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 has been coded. This is 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 below shows that a special Language Environment exit module is included 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.

//*     - - -  ADD A JOB CARD ABOVE THIS LINE  - - -
//*
//*  SAMPLE JCL TO PREPARE AN ENTERPRISE COBOL PROGRAM
//*  FOR THE IBM ZSERIES PD TOOLS 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(NONE,SYM,SEP) HAS THREE 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 XXXLANGX
//*    4. COMPILER PARM NOOPT IS OPTIONAL.  HOWEVER, THE DEBUG TOOL
//*       COMMANDS JUMPTO AND GOTO WILL NOT BE AVAILABLE IF
//*       THE OPT PARM IS USED
//*
//*   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)
//*
//*  SET PARMS FOR THIS COMPILE:
//*  ---------------------------
//   SET MEM=SAM1                             PROGRAM NAME
//   SET COBOLLIB='IGY.V3R4.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(NONE,SYM,SEPARATE),LIST,MAP,SOURCE,NONUMBER,XREF(SHORT)')
//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, 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))



Rate this page

[ Top of Page | Previous Page | Next Page | Contents | Index ]