Creating side files using CAZLANGX
Refer to chapter Quick start guide for compiling and assembling programs for use with IBM Problem Determination Tools products in IBM Problem Determination Tools for z/OS® Common Component: Customization Guide and User Guide for the recommended method of preparing your programs for use with the IBM® Problem Determination Tools products. Alternatively, you may use LANGX side files for your source information files in Application Performance Analyzer. This appendix explains the process required to create side files from compiler listings, using the program CAZLANGX. The CAZLANGX module resides in the Problem Determination Tools for z/OS Common Component library SIPVMODA.
- Allocates a new data set yourhlq.CAZLANGX to hold the side file, which will be created in the next step.
- Compiles an Enterprise COBOL program. Note: You can only compile one program per compile step in order to name the compiler listing PDS(E) member (if using a partitioned data set), and to ensure that only one compiler listing is written to the output file.
- Executes CAZLANGX to process the listing and store it as a side file where Application Performance Analyzer can access it.
- Writes the listing as part of the job output.
The sample JCL is provided as member CAZSCMPS in the hlq.SCAZSAMP data set.
//CAZSCMPS JOB <JOB PARAMETERS>
// JCLLIB ORDER=(IGY.V3R3M0.SIGYPROC) <== INSTALLATION
//* IGYWC PROC
//****************************************************************
//* Licensed Materials - Property of IBM *
//* 5697-N37 *
//* (C) Copyright IBM Corp. 2005 *
//* *
//* All Rights Reserved *
//* US Government Users Restricted Rights - Use, duplication *
//* or disclosure restricted by GSA ADP Schedule Contract *
//* with IBM Corp. *
//****************************************************************
//* *
//* IBM Application Performance Analyzer for z/OS *
//* Version 1 Release 1 Modification 0 *
//* *
//* This JCL compiles a COBOL program and produces a side file *
//* from the program listing that Application Performance *
//* Analyzer uses to obtain the source information. *
//* The compiled output is then written to SYSUT2 in the *
//* IEBGENER step. *
//* *
//* CAUTION: This is neither a JCL procedure nor a complete *
//* job. Before using this job step, you will have to *
//* make the following modifications: *
//* *
//* 1) Add the job parameters to meet your system requirements. *
//* 2) This job invokes the COBOL procedure IGYWC. *
//* Update the procedure library name on the JCLLIB *
//* statement as appropriate. *
//* 3) Change "#hlq" to the appropriate high-level qualifier. *
//* 4) Change "#yourhlq" to the appropriate high-level *
//* qualifier. *
//* *
//****************************************************************
//*
//* Pre-allocate data set CAZLANGX to which the side file
//* will be written.
//*
//ALLOC EXEC PGM=IEFBR14
//CAZLANGX DD DSN=#yourhlq.CAZLANGX,DISP=(NEW,CATLG),
// UNIT=SYSALLDA,SPACE=(TRK,(20,20,10)),
// DCB=(RECFM=VB,LRECL=1562,BLKSIZE=0)
//*
//* Compile a COBOL program.
//*
//CBLRUN EXEC IGYWC,PARM.COBOL='LIST,MAP,SOURCE,XREF'
//COBOL.SYSIN DD DATA,DLM='##'
CBL APOST,NOOPT,DYNAM,SSRANGE,RENT
IDENTIFICATION DIVISION.
PROGRAM-ID. CAZSCBL1
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 FILLER PIC X(20) VALUE 'WORKING-STORAGE'.
01 NUMBERX PIC 999999 COMP-3.
01 ERROR-FLD.
05 ERROR-COUNT PIC 999999 COMP-3.
05 FLDY REDEFINES ERROR-COUNT.
07 FLDZ PIC XXXX.
01 BAD-RESULT PIC 99 COMP-3.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY '*** CAZSCBL1 - START OF PROGRAM'.
LOOP SECTION.
START000.
MOVE 3 TO ERROR-COUNT.
ADD 986885 TO ERROR-COUNT GIVING NUMBERX.
MOVE 'ABCD' TO FLDZ.
IF NUMBERX > 0 THEN PERFORM CLEAR.
DISPLAY '*** CAZSCBL1 - END OF PROGRAM'.
GOBACK.
CLEAR SECTION.
START001.
DIVIDE NUMBERX BY ERROR-COUNT GIVING BAD-RESULT.
EXIT.
END PROGRAM CAZSCBL1.
##
//COBOL.SYSPRINT DD DSN=&&COBLIST(CAZSCBL1),
// DISP=(,PASS),SPACE=(TRK,(10,5,5),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0)
//*
//* Create a side file.
//*
//CAZLANGX EXEC PGM=CAZLANGX,REGION=4096K,
// PARM='CAZSCBL1 (COBOL ERROR '
//STEPLIB DD DISP=SHR,DSN=#hlq.SIPVMODA
//LISTING DD DISP=(OLD,PASS),DSN=&&COBLIST 1
//IDILANGX DD DISP=SHR,DSN=#yourhlq.CAZLANGX
//SYSUDUMP DD SYSOUT=*
//*
//* Print the COBOL listing.
//*
//IEBGENER EXEC PGM=IEBGENER,REGION=4096K
//SYSUT1 DD DISP=OLD,DSN=&&COBLIST(CAZSCBL1)
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//*
After you have created and stored a side file, there is no benefit to Application Performance Analyzer in retaining the listing.
If you already have listings, you can turn them into side files. Here is sample JCL to do this:
//CAZLANGX JOB <JOB PARAMETERS>
//*************************************************************
//* This job produces a side file from a program listing
//* that Application Performance Analyzer can use
//* for obtaining source information.
//* This particular example is set up for a COBOL extraction
//* from CAZ.LISTING.COBOL(COBOLA) to CAZ.CAZLANGX
//*************************************************************
//CAZLANGX EXEC PGM=CAZLANGX,REGION=4096K,
// PARM='COBOLA (COBOL ERROR'
//STEPLIB DD DISP=SHR,DSN=#hlq.SIPVMODA
//LISTING DD DISP=SHR,DSN=yourhlq.LISTING.COBOL 1
//IDILANGX DD DISP=SHR,DSN=yourhlq.CAZLANGX
//SYSUDUMP DD SYSOUT=*