COBOL Manual for TNS and TNS/R Programs
Program Compilation
HP COBOL Manual for TNS and TNS/R Programs—522555-006
11-57
CHECK
At run time, if the subscript or reference modifier used in a statement is out of range,
an error is reported, and the execution terminates.
Default: CHECK 1
Placement: Anywhere
Scope: In each separately compiled program, the last CHECK in the program
unit determines the check level for the code block being produced.
Dependencies: None
Table 11-19. CHECK Levels
check-level What is Checked Comments
0 Nothing CHECK 0 results in the fastest
execution time.
1 (default) Nothing CHECK 1 might have a different
meaning in future versions of
HP COBOL. For the fastest execution
(and no subscript checking) in current
and future versions of HP COBOL,
specify CHECK 0.
2 Validity of subscripts and indexes*
3 Validity of subscripts, indexes, and
reference modifiers*
Specifies the maximum level of
checking that HP COBOL currently
provides.
4-15 Validity of subscripts, indexes, and
reference modifiers*
4-15 might have different meanings in
future versions of HP COBOL. For the
maximum level of checking that
HP COBOL currently provides, specify
CHECK 3. For maximal checking,
specify CHECK 15 (which could
increase the program’s run-time
overhead in future versions of
HP COBOL if additional checking
levels are implemented).
* The compiler generates extra code in order to check the validity of these items.