Generating a report of COBOL programs

Use ddname IGZPROUT at the run step of your JCL to generate a report of COBOL programs that are compiled with Enterprise COBOL 5 or later releases.

About this task

The report does not include any non-COBOL programs that either call a COBOL program or are called by a COBOL program. Additionally, programs compiled with LP(64) are not included.
Important: To make full use of the functions as described in this topic, ensure that the COBOL runtime PTF for APAR PH61133 is installed on your system. Before installing the PTF, the report had a different layout and included only dynamically called programs compiled with Enterprise COBOL 5 or later releases. Additionally, the SERVICE string information was not included in the report.

The report provides details including the ID, Program Name, Compiler Version, Compilation Time and Date, and SERVICE information. For details about the SERVICE option, see SERVICE. Only programs compiled with COBOL 5 or later versions are listed. Details of dynamically called programs that have been cancelled are printed separately under the CANCELLED PROGRAMS heading.

Statically called programs and those called via DLL linkage cannot be cancelled. Therefore, the report does not include these programs under the CANCELLED PROGRAMS heading when attempted. For details about the CANCEL statement, see CANCEL statement in the Enterprise COBOL for z/OS® Language Reference. For details about DLL programs, see Using DLL linkage and dynamic calls together.

If a program is dynamically called again after cancellation, it will appear under the COBOL ACTIVE PROGRAMS heading. If the program is subsequently cancelled again before termination, it will appear under the CANCELLED PROGRAMS heading.

Each dynamic, static, or DLL program is assigned a unique 6-digit ID. The character ‘M’ precedes the 6-digit ID to identify the main program. In the generated report, program names are limited to 8 characters and service strings are limited to 10 characters. If either the program name or service string exceeds these limits, an asterisk will precede it. A separate section at the end of the report will display the longer program name or service string along with their corresponding ID.
Note: If a program is called or cancelled multiple times, the report will list the program only once, either under COBOL ACTIVE PROGRAMS or CANCELLED PROGRAMS headings, based on its status at termination.
Recommended attributes for the IGZPROUT ddname are as follows:
DSORG = PS  RECFM = FB  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)
Here is a sample output report:
 +++++++++++++ BEG OF COBOL 5 AND LATER RELEASES PROGRAM REPORT V02 +++++++++++++
 ================================================================================
 = COBOL ACTIVE PROGRAMS                                                        =
 ================================================================================
   ID      NAME      VERSION  DATE/TIME COMPILED   SERVICE                      
   ------  --------  -------  -------------------  ----------
   000001  PROG1     060400   2024/03/20 10:56:40
   000002  PROG2     060200   2024/03/20 10:56:40  SERVICE 1
   000003  PROG3     060400   2024/03/20 10:56:42 *SERVICE ST
   000004 *PROG4LON  060300   2024/03/20 10:56:42 
   000005 *PROG5THI  060400   2024/03/20 10:56:42 *LONG SERVI
  M000006  PROG8     060200   2024/03/20 10:56:42         

 ================================================================================
 = CANCELLED PROGRAMS                                                           =
 ================================================================================
   ID      NAME      VERSION DATE/TIME COMPILED   SERVICE 
   ------  --------  ------- -------------------  ----------
   000007  PROG6     060300  2024/03/20 10:56:40
   000008  PROG9     060400  2024/03/20 10:56:40 *SERVICE ST

 ================================================================================
 = LONG PROGRAM NAME LIST                                                       =
 ================================================================================
   ID      PROGRAM NAME
   ------  ----------------------------------------------------------------------
   000004  PROG4LONGPROGRAMNAME1
   000005  PROG5THISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAM
           ETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHI
           SISALONGPROGRAMNAMET

 ================================================================================
 = LONG SERVICE STRING LIST                                                     =
 ================================================================================
   ID      SERVICE STRING
   ------  ----------------------------------------------------------------
   000003  SERVICE STRING LONG 1
   000005  LONG SERVICE STRING CAN HAVE A MAXIMUM LENGTH OF 64 CHARACTERS!
   000008  SERVICE STRING LONG 2

 ++++++++++++++++++++++++++++ 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.

Related references
Making dynamic calls