ILE COBOL Language Reference

Subscripting

Subscripting is a method of providing table references through the use of subscripts. A subscript is a positive integer whose value specifies the occurrence number of a table element.

Subscripting is related to the OCCURS clause through the number of dimensions in a table. For example, a 4-dimensional table will require four subscripts. You may think of subscripting as the COBOL way of identifying elements in a multidimensional array, which was defined through the OCCURS clause.

For detailed information, see Subscripting.

If the RANGE option is specified or implied, the system ensures that the subscript value is valid. If the RANGE option is not active, it is your responsibility to ensure that the subscript value is valid. The RANGE option does not cause the system to verify that index entries are valid; it is your responsibility to ensure valid index values.

Note:
See the ILE COBOL for AS/400 Programmer's Guide for comprehensive information on the CRTCBLMOD and CRTBNDCBL commands, and the PROCESS statement.

Related Information:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]