
PARMCHECK
The PARMCHECK
option tells the compiler
to generate an extra data item following the last item in WORKING-STORAGE
.
This buffer data item is then used at run time to check whether a
called subprogram corrupted data beyond the end of WORKING-STORAGE
.
When a calling program
is compiled with PARMCHECK
, the compiler generates
a buffer following the last data item in the WORKING-STORAGE
section.
At run time, before each call, the buffer is set to ALL x'AA'. After
each call, the buffer is checked to see whether it was changed. The PARMCHECK
option
can help with your migration from COBOL V4 and earlier compilers to
COBOL V6 and later compilers, and can also be used to clean up and
check for good programming practices.
- Default
PARMCHECK=(NO)
MSG
|ABD
- Determines whether the message issued for subprogram corruption of data is a warning level message to continue processing or a terminating level message to cause an abend:
- If
MSG
is in effect, a runtime warning message with the name of the parameter, the line number of theCALL
statement, and the program name is issued. - If
ABD
is in effect, a similar message is issued, but with a terminating level that causes an abend.
- If
- n
- The size in bytes of the buffer to be added after the last item
in
WORKING-STORAGE
. Must be an integer in the range of 1 to 9999. NO
No buffer data item is generated following the last item in WORKING-STORAGE.
Performance considerations: PARMCHECK
will
cause the compiler to generate slower code for programs with CALL
statements. NOPARMCHECK
should
be in effect for good performance.
