BOUND

Specifies that subscript or index values are to be checked to ensure they are within the limits defined by their OCCURS clause.

Syntax:

>>-.---.-.----.--BOUND---------------------><
   +-/-+ +-NO-+

Parameters:

None

Properties:

Default: BOUND
Phase: Both
$SET: Initial

Dependencies:

BOUND sets NOBOUNDOPT at end.

Set to BOUND by CHECK.

Comments:

For multi-dimensional tables, only the composite subscript is checked. If any of the individual subscripts or indices is beyond its limit, but the reference remains within the table, no error is produced.

For JVM COBOL code, even if NOBOUND is set, the JVM will still throw an IndexOutOfRangeException if the bounds of the array are exceeded.