Tuesday, March 5, 2024

Generating a report of dynamically called COBOL programs

IBM Enterprise COBOL V6R4 allows you to produce a report of all subroutines called by dynamic call. Use ddname IGZPROUT at the run step of your JCL to generate a report of all dynamically called programs that are compiled with Enterprise COBOL 5 or later.

The report details include the Program Name, Compiler Version, and Time and Date of compilation of the programs. Only programs that are compiled with COBOL 5 or later will be listed. Details of cancelled programs are printed at the end.

Note: If a program is cancelled multiple times, then the report prints it only once.

Recommended attributes for the IGZPROUT ddname are as follows:
DSORG = PS   RECFM = FB   78 = LRECL = 80

Here are the examples of setting the IGZPROUT ddname:
//IGZPROUT DD SYSOUT=*

or
//IGZPROUT DD DSN=dynamic.call.report.dsname,DISP=SHR

or
//IGZPROUT DD DSN=dynamic.call.report.dsname,
// UNIT=SYSDA,SPACE=(TRK,(5,10),RLSE),
// DCB=(DSORG=PS,LRECL=80,RECFM=FB,BLKSIZE=0),
// DISP=(NEW,CATLG,DELETE)

You can get an output report as follows:

*********************** DYNAMICALLY CALLED PROGRAM REPORT ********************
************************* FOR COBOL 5 AND LATER RELEASES *********************

NAME       COMPILER VER.       DATE/TIME COMPILED
-----------------------------------------------------------------------------
PROG1      V06 R02 M00         2021/01/01 15:30:02
PROG2      V06 R02 M00         2021/01/01 15:30:12

The following programs are marked as cancelled at termination:
PROG3      V06 R03 M00         2022/02/13 17:36:29
*************************** END OF PROGRAM REPORT ****************************

Note: For dynamic calls, the program-name in the PROGRAM-ID paragraph or ENTRY statement must be identical to the corresponding program object name or program object alias of the program object that contains the program. If the PROGRAM-ID paragraph or the ENTRY statement is not identical to the corresponding program object (PDSE member) name or program object alias of the program object that contains the program, then the report will list the program-name in the PROGRAM-ID paragraph or the ENTRY statement, as opposed to listing the program object (PDSE member) name or the program object alias name.

A Very good youtube from "Dinosaur Parkour" about this feature can be found in the below link.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.