Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

RUNTIME-CHECKS option

This option can be used to activate the check routines of the runtime system.

Format

RUNTIME-CHECKS = *NONE / *ALL / *PARAMETERS(...)


*PARAMETERS(...)


|

TABLE-SUBSCRIPTS = *NO / *YES


|

,FUNCTION-ARGUMENTS = *NO / *YES


|

,PROC-ARGUMENT-NR = *NO / *YES


|

,RECURSIVE-CALLS = *NO / *YES


|

,REF-MODIFICATION = *NO / *YES


RUNTIME-CHECKS = *NONE
No check routines of the runtime system are requested.

RUNTIME-CHECKS = *ALL
All check routines of the runtime system that are named in the PARAMETERS structure are to be activated.

RUNTIME-CHECKS = *PARAMETERS(...)

TABLE-SUBSCRIPTS = *NO / *YES
If YES is specified, the runtime system checks that table bounds are kept to (both for subscripting and for indexing).
Checks are made to determine whether

    • index values are greater than zero,

    • index values are not greater than the number of elements in the corresponding dimensions,

    • index values are not greater than associated values in DEPENDING ON items,

    • values in DEPENDING ON items are within the bounds defined in corresponding OCCURS clauses.

The runtime system responds with message COB9144 or COB9145 and aborts the program in the event of an error if ERROR-REACTION = TERMINATION was specified in the RUNTIME-OPTIONS option.

FUNCTION-ARGUMENTS = *NO / *YES
If YES is specified, the value range, number, and length of function arguments are checked at runtime. If invalid values are detected, one of the messages COB9123, COB9125, COB9126 or COB9127 is issued; the program will abort if ERROR-REACTION = TERMINATION was specified in the RUNTIME-OPTIONS option.

PROC-ARGUMENT-NR = *NO / *YES
If YES is specified, a check is made when a COBOL subprogram is called to determine whether the number of parameters passed matches the number expected. If there is a discrepancy, message COB9132 is issued, and the program will abort if ERROR-REACTION = TERMINATION was specified in the RUNTIME-OPTIONS option.The check is only effective if the called program was compiled with this option and if the calling program was compiled with a compiler version >= 2.0.

RECURSIVE-CALLS = *NO / *YES
If YES is specified, a check will be made on the call hierarchy of a program run unit; that is, the runtime system uses a table to check whether a subprogram is being called recursively, i.e. is still active. If there is a recursive call and the CALL statement contains no ON EXCEPTION phrase, the program run is aborted with the error message COB9157.
Every program that contains a CALL identifier and/or CANCEL should be compiled using RECURSIVE-CALLS=YES.
This option is ignored for compilation units that are not programs and is rejected for programs with a RECURSIVE specification in the PROGRAM-ID (when YES is set).

REF-MODIFICATION = *NO / *YES
Specifying YES causes the runtime system to verify compliance with data-item limits for identifiers subject to reference modification. If data-item limits are not complied with, error message COB9140 is issued and the program is continued or aborted depending on the ERROR-REACTION parameter of the RUNTIME-OPTIONS option.