Report COBOL runtime message (IGZRPTMSG)
IGZRPTMSG
specifies whether the COBOL runtime message report is
generated during run-unit termination.
+++++++++++++++++++++ BEG OF COBOL RUN-TIME MESSAGE REPORT +++++++++++++++++++++
================================================================================
= RUN-TIME MESSAGE LIST =
================================================================================
ID PGM NAME ENTRY OFFSET LINEID MSG ID REPEATED ISSUED
------ -------- -------- --------- -------- ------- --------- ---------
...
++++++++++++++++++++++++++++ END OF MESSAGE Report +++++++++++++++++++++++++++++
With IGZRPTMSG(ON)
, the COBOL runtime message report above provides details
about COBOL runtime messages with its invocation location and the number of occurrences since the
beginning of a COBOL application.
For AMODE 64, the report is written to the stderr
file handle.
For AMODE 24 or AMODE 31, in non-CICS, the report is written to the
ddname
that is specified in the Language Environment
MSGFILE
runtime option. For more information, see MSGFILE. In CICS, the report is written to the CESE
queue.
The default option is IGZRPTMSG(OFF)
.
- OFF
-
This option indicates that the COBOL runtime message report is not generated.
- ON
-
This option indicates that the COBOL runtime message report is generated.
- The report records COBOL runtime messages that are issued in only COBOL 5 or later releases.
- The report does not record messages that are issued in COBOL 4.2 and prior releases.
- The
IGZPRTMSG(ON)
option is not supported in a multithreaded environment, resulting in an empty report. - The
IGZUQMSG(ON)
option is used to ignore repeated identical messages.
Example
COBOL source code:CBL NUMCHECK,OPT(0)
IDENTIFICATION DIVISION.
PROGRAM-ID. 'DEMO'.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RES PIC S9(3).
01 VAL1X PIC X(3) VALUE X'12345F'.
01 VAL1 REDEFINES VAL1X PIC 9(4) COMP-3.
01 VAL2 PIC 9(4) COMP-3 VALUE 567.
01 VAL3 PIC S9(3) VALUE -6.
PROCEDURE DIVISION.
PERFORM 2 TIMES
COMPUTE RES = VAL1 + VAL2 *>IGZ0279W
COMPUTE RES = VAL3 ** 2.3 *>IGZ0048W
END-PERFORM
STOP RUN.
END PROGRAM 'DEMO'.
The following output is generated at the run time with the
IGZPRTMSG(ON)
option:
IGZ0279W
and
IGZ0048W
are emitted twice due to the PERFORM 2 TIMES
command in
the COBOL source code.
With the IGZPRTMSG(ON)
option, the COBOL runtime
message report is
generated.
IGZ0279W The value X'12345F' of data item VAL1 at the time of reference by statement number 1 on line 16 in program DEMO failed the NUMERIC class test or contained a value larger than the PICTURE clause as detected by the NUMCHECK compiler option.
IGZ0048W A negative base was raised to a fractional power in an exponentiation expression in program DEMO at displacement X'240'. The absolute value of the base was used.
IGZ0279W The value X'12345F' of data item VAL1 at the time of reference by statement number 1 on line 16 in program DEMO failed the NUMERIC class test or contained a value larger than the PICTURE clause as detected by the NUMCHECK compiler option.
IGZ0048W A negative base was raised to a fractional power in an exponentiation expression in program DEMO at displacement X'240'. The absolute value of the base was used.
+++++++++++++++++++++ BEG OF COBOL RUN-TIME MESSAGE REPORT +++++++++++++++++++++
================================================================================
= RUN-TIME MESSAGE LIST =
================================================================================
ID PGM NAME ENTRY OFFSET LINEID MSG ID REPEATED ISSUED
------ -------- -------- --------- -------- ------- --------- ---------
1 DEMO 26A0C630 +00000240 0 IGZ0048 2 2
2 DEMO 26A0C630 +00000450 16 IGZ0279 2 2
--------- ---------
TOTAL 4 4
++++++++++++++++++++++++++++ END OF MESSAGE Report +++++++++++++++++++++++++++++
The following output is generated at the run time with
IGZUQMSG(ON)
and IGZPRTMSG(ON)
options:
With the
IGZUQMSG(ON)
option, IGZ0279W
and IGZ0048W
are
repeated twice but emitted only once as shown in the REPEATED
and
ISSUED
columns in COBOL RUN-TIME MESSAGE
REPORT
.
IGZ0279W The value X'12345F' of data item VAL1 at the time of reference by statement number 1 on line 16 in program DEMO failed the NUMERIC class test or contained a value larger than the PICTURE clause as detected by the NUMCHECK compiler option.
IGZ0048W A negative base was raised to a fractional power in an exponentiation expression in program DEMO at displacement X'240'. The absolute value of the base was used.
+++++++++++++++++++++ BEG OF COBOL RUN-TIME MESSAGE REPORT +++++++++++++++++++++
================================================================================
= RUN-TIME MESSAGE LIST =
================================================================================
ID PGM NAME ENTRY OFFSET LINEID MSG ID REPEATED ISSUED
------ -------- -------- --------- -------- ------- --------- ---------
1 DEMO 26A0C630 +00000240 0 IGZ0048 2 1
2 DEMO 26A0C630 +00000450 16 IGZ0279 2 1
--------- ---------
TOTAL 4 2
++++++++++++++++++++++++++++ END OF MESSAGE Report +++++++++++++++++++++++++++++
The following section describes the meaning of each header in the COBOL RUN-TIME
MESSAGE REPORT
:
- PGM NAME
-
A COBOL program name. When the program name is longer than 8 characters long, it is displayed separately in the same way as Generating a report of COBOL programs.
- ENTRY
-
An entry address of the COBOL program named
PGM NAME
. - OFFSET
-
An offset from the
ENTRY
to a location, where a COBOL runtime message internal routine is called. This offset can be found when a COBOL program listing is generated with theLIST
option. - LINEID
-
A COBOL source line number extracted from a runtime message. For example, 16 in the
LINEID
was extracted from '...on line 16...' in the following runtime message:IGZ0279W The value X'12345F' of data item VAL1 at the time of reference by statement number 1 on line 16 in program DEMO failed the NUMERIC class...
If the runtime message does not have a line number to be extracted, but
DWARF
diagnostic information is available, theLINEID
is extracted from theDWARF
information. For more about theDWARF
, see TEST. - MSG ID:
-
A COBOL runtime message number.
- REPEATED
-
The number of a COBOL runtime message that is repeated.
- ISSUED
-
The number of a COBOL runtime message that is emitted.