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

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, included only dynamically called programs compiled with Enterprise COBOL 5 or later releases, and did not include the SERVICE string information.

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.

Programs that are called dynamically, statically, and via DLL are listed under the COBOL ACTIVE PROGRAMS heading if they are active at program termination. 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.
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. For example, if a program is dynamically called again after cancellation at termination, it will appear under the COBOL ACTIVE PROGRAMS heading. If a program is subsequently cancelled again at 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. For details about program names, see PROGRAM-ID paragraph in the Enterprise COBOL for z/OS Language Reference.

The report does not list the following programs:
  • Programs compiled with IBM Enterprise COBOL for z/OS 4.2 and earlier
  • Programs compiled with LP(64)
  • Any non-COBOL programs that either call a COBOL program or are called by a COBOL program
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                                                        =           (1)      
 ================================================================================
   ID      NAME      VERSION  DATE/TIME COMPILED   SERVICE                                  (2)
   ------  --------  -------  -------------------  ----------
   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                                           (3)

 ================================================================================
 = CANCELLED PROGRAMS                                                           =           (4)
 ================================================================================
   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                                                       =           (5)
 ================================================================================
   ID      PROGRAM NAME
   ------  ----------------------------------------------------------------------
   000004  PROG4LONGPROGRAMNAME1
   000005  PROG5THISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAM
           ETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHISISALONGPROGRAMNAMETHI
           SISALONGPROGRAMNAMET

 ================================================================================
 = LONG SERVICE STRING LIST                                                     =           (6)
 ================================================================================
   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 +++++++++++++++++++++++++++++
(1)

The COBOL ACTIVE PROGRAMS section is always displayed by default.

(2)
  • ID: Each program is assigned a unique ID for easy reference throughout the report. In this example, PROG1 is assigned the ID of 000001. The total number of programs can be determined by identifying the largest ID value, which could be in the COBOL ACTIVE PROGRAMS or CANCELLED PROGRAMS section, depending on whether there are cancelled programs.
  • NAME: The NAME column shows the COBOL PROGRAM-ID and can display up to 8 characters in the COBOL ACTIVE PROGRAMS section. If the program name exceeds 8 characters, an asterisk (*) appears before the name, indicating it is a long name. The full program name is listed separately in the LONG PROGRAM NAME LIST section with its corresponding ID. For example, program ID 000004 has a name longer than 8 characters. The first 8 characters, PROG4LON, are shown with an asterisk, and the full name is printed in the LONG PROGRAM NAME LIST section.
    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.
  • VERSION: Indicates the version of the compiler, represented by an integer in the format VVRRMM, where VV stands for the compiler version number, RR stands for the compiler release number, and MM stands for the compiler modification number. For example, compiler version 6.4.0 is represented as 060400.
  • DATE/TIME COMPILED: Indicates the date and time of the compilation.
  • SERVICE: The SERVICE column displays the SERVICE string associated with each program and can show up to 10 characters in the COBOL ACTIVE PROGRAMS or CANCELLED PROGRAMS section. If the string exceeds 10 characters, an asterisk (*) appears before it, indicating a long SERVICE string. The full SERVICE string is listed separately in the LONG SERVICE STRING LIST section with its corresponding ID. For example, program ID 000008, named PROG8, was cancelled at termination. Since its SERVICE string was longer than 10 characters, the first 10 characters are printed in the CANCELLED PROGRAMS section, and the full string is printed in the LONG SERVICE STRING LIST section.
(3)
The character ‘M’ before the ID value 000006 of PROG8 identifies the main program. PROG8 is the caller program that calls other COBOL programs either dynamically, statically, or via DLL linkage.
(4)
The CANCELLED PROGRAMS section is displayed only if there are programs that were dynamically called and then cancelled using the CANCEL statement.
(5)
The LONG PROGRAM NAME LIST section is optionally displayed depending on whether any program names exceed 8 characters. See also NAME in (2).

In the LONG PROGRAM NAME LIST section, program names are printed with a maximum of 70 characters per line before wrapping to the next line. For example, for program ID 000005 with a 160-character name, the first 70 characters are displayed on the first two lines, and the remaining 20 characters appear on the third line. There is no special character to indicate the name wrapping.

(6)
The LONG SERVICE STRING LIST section is optionally displayed depending on whether any SERVICE strings exceed 10 characters. See also SERVICE in (2).

Related references
Making dynamic calls