SSRANGE

Turns on bounds checking for reference modifications, subscripting and indexes.
Note: This directive is supported for native COBOL only.

Syntax:

>>-.---.-.-SSRANGE-.----------.--.-------><
   +-/-+ |         +-"integer"+  |
         +-NOSSRANGE-------------+

Parameter:

integer
The level of SSRANGE support required. The possible values are:
1
At run-time, subscripts and indexes are checked to ensure they are not referencing an area outside the table, and reference modified items are checked for negative or zero value.
2
At both compile time and run time, subscripts, reference modified items, and indexes are checked to ensure they are not referencing an area outside the table. For JVM COBOL reference modification, this is equivalent to CHECKREFMOD"NOZEROLENGTH".
3
As SSRANGE"2", except that reference modifies lengths of zero are permitted at run time. However, if a reference modified length is known to be zero at compile time, an error is generated. For JVM COBOL reference modification, this is equivalent to CHECKREFMOD.

Properties:

Default: NOSSRANGE
Phase: Syntax check
$SET: Initial

Dependencies:

Sets BOUND immediately

Comments:

This directive is provided for emulation of the IBM mainframe compiler of the same name; because of this, its scope is limited to the syntax permissible in a mainframe dialect.

If you set SSRANGE without an integer, the behavior is the same as SSRANGE"2".

For unbounded groups or their subordinate items, checking is done only for reference modification expressions. Subscripted or indexed references to tables subordinate to an unbounded group are not checked.