Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Example: subscripting

The following example shows valid references to SAMPLE-TABLE-THREE that use literal subscripts. The spaces are required in the second example.

TABLE-COLUMN (2, 2, 1)
TABLE-COLUMN (2 2 1)

In either table reference, the first value (2) refers to the second occurrence within TABLE-DEPTH, the second value (2) refers to the second occurrence within TABLE-ROW, and the third value (1) refers to the first occurrence within TABLE-COLUMN.

The following reference to SAMPLE-TABLE-TWO uses variable subscripts. The reference is valid if SUB1 and SUB2 are data-names that contain positive integer values within the range of the table.

TABLE-COLUMN (SUB1 SUB2)

related tasks  
Subscripting


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)