ZONECHECK
Use
the ZONECHECK
option to have the compiler generate IF
NUMERIC
class tests for zoned decimal data items that are
used as sending data items.
ZONECHECK
is deprecated but
is tolerated for compatibility, and it is replaced by NUMCHECK(ZON(ALPHNUM))
. Default is: NOZONECHECK
Abbreviations
are: NOZC
|ZC(MSG)
|ZC(ABD)
MSG
The
MSG
suboption requests that anIF NUMERIC
test be done on every use of zoned decimal data items as senders, and if the data is invalid (for example,NOT NUMERIC
), a runtime warning message with the line number, data item name, data item content, and program name is issued. Also, the affected statements will still be executed.ZONECHECK(MSG)
is treated as ifNUMCHECK(ZON,MSG)
were in effect.ABD
The
ABD
suboption requests that anIF NUMERIC
test be done on every use of zoned decimal data items as senders, and if the data is invalid (for example,NOT NUMERIC
), a terminating message is issued that causes an abend.ZONECHECK(ABD)
is treated as ifNUMCHECK(ZON,ABD)
were in effect.
ZONECHECK(MSG)
and ZONECHECK(ABD)
result
in the compiler generating an implicit numeric class test for each
zoned decimal data item that is referenced as a sender in a COBOL
statement. Receivers are not checked, unless they are both a sender
and a receiver, such as data item B in the following sample statements:ADD A TO B
DIVIDE A INTO B
COMPUTE B = A + B
INITIALIZE B REPLACING ALPHANUMERIC BY B
- If the data item is
NOT NUMERIC
, either a warning message forZONECHECK(MSG)
or a terminating message forZONECHECK(ABD)
is issued. - If the data item is
NUMERIC
, the external behavior of the statement is the same asNOZONECHECK
, other than being slower.
CALL
statements, ZONECHECK
checks BY
CONTENT
and BY VALUE
data items that are
numeric USAGE DISPLAY
only, but it does not check BY
REFERENCE
parameters.Performance considerations: ZONECHECK(MSG)
and ZONECHECK(ABD)
are
much slower than NOZONECHECK
, depending on how many
zoned decimal data items are used in COBOL statements in a program.