Unique COBOL runtime messages (IGZUQMSG)

IGZUQMSG specifies whether only unique COBOL runtime messages are emitted at the run time.

With IGZUQMSG(ON), when multiple messages need to be emitted, the first unique message is emitted, but subsequent identical messages are silently ignored. Two messages are identical when they are issued at the same displacement within the same COBOL program.

IGZUQMSG option syntax

Read syntax diagramSkip visual syntax diagramIGZUQMSG(OFFON)

The default option is IGZUQMSG(OFF).

OFF

This option indicates that all COBOL runtime messages are emitted.

ON

This option indicates that unique COBOL runtime messages are emitted.

Note:
  • The option is applicable to COBOL 5.1 and later releases that emit COBOL runtime messages (IGZnnn where "nnn" is numeric, such as IGZ0279).
  • The option is silently ignored with COBOL 4.2 and prior releases.
  • The option is silently ignored in a multithreaded environment.
  • The IGZRPTMSG(ON) option is used to generate a report about repeated and emitted 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 IGZUQMSG(OFF) option:

IGZ0279W and IGZ0048W are emitted twice due to the PERFORM 2 TIMES command in the COBOL source code.

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.

The following output is generated at the run time with the IGZUQMSG(ON) option:

IGZ0279W and IGZ0048W are emitted only once.

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.