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

VS COBOL II programs

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.

Table 6. Examples of compiler options and source information files supported by Problem Determination tools products for VS COBOL II
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
Note:
The highlighted row or rows in the table above indicate the suggested compiler options and source information file types for each product.

Preparing VS COBOL II programs

Perform the following steps for compiling your VS COBOL II programs using the compiler options suggested in Table 6:

  1. Allocate libraries (PDSE is suggested unless PDS is required for your organization) for LANGX files. Allocate one or more LANGX libraries for each environment, such as test and production.
  2. Create a corresponding LANGX library for each load library. Specify LRECL=1562 or greater,RECFM=VB,BLKSIZE= lrecl+4 to 32k.
  3. For all programs, such as batch, CICS, and IMS, in both test and production environments, compile with NOTEST,LIST,MAP,NOOPT,SOURCE,XREF,NONUMBER compiler options.
  4. Modify the SYSPRINT DD in the compiler step to refer to a file. It can be either a permanent or temporary file. This will be the input to the xxxLANGX utility.
  5. Add a step after the compiler step to run the Problem Determination tools xxxLANGX utility. This utility program reads the compiler listing and generates a LANGX file. This is the source information file for Debug Tool for z/OS, Fault Analyzer for z/OS and Application Performance Analyzer for z/OS. Save the LANGX file in the LANGX file library and specify a member name that is equal to the program name of your application program. Equivalent xxxLANGX utilities are available in Debug Tool for z/OS as EQALANGX, in Fault Analyzer for z/OS as IDILANGX and in Application Performance Analyzer for z/OS as CAZLANGX.
  6. If the module is linked with Language Environment services, optionally include a Debug Tool Language Environment exit module into the load module during the linkage editor step. This is one way to enable the Debug Tool 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 or if the module is not linked with Language Environment services (it is linked with COBOL II runtime services).
  7. Modify the promotion process to promote LANGX files. When a load module is promoted, for example, from test to production, promote the corresponding LANGX file or files. A promotion can be a recompile, copy, or move. Perform the same steps with the LANGX file that you perform with the module during promotion.

Sample JCL for compiling VS COBOL II programs

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))   



Rate this page

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