How a Subscript Works in COBOL
- Subscript should be an integer.
- It should have a working storage definition
- Subscript can be passed to a sub-program
- Subscript varies from 1 to size of OCCURS
- Subscript references a Table item
How an Indexed By Works in COBOL
- An INDEXED BY XXXX phrase must be defined for an array/table
- An index cannot be passed to a sub-program
- It does not require working storage definition
- The index varies from 0 to size of (OCCURS-1)
- It references a Table item.
- It is an internal representation
- Performance-wise index is good compared to subscript