I'm trying to get familiar with the accessing modes for tables. I would like to use theses 'free indices' (declared on level 77) but didn't manage it. How can I use this kind of indices?
I have the following strukture and I would like to access all attributes in the same loop with only one index:
10 ATTRIBUTE-A OCCURS 50 PIC X(5).
10 ATTRIBUTE-B OCCURS 50 PIC X(8).
10 ATTRIBUTE-C OCCURS 50 PIC X(26).
10 ATTRIBUTE-D OCCURS 50 PIC S9(5)V USAGE COMP-3.
10 ATTRIBUTE-E OCCURS 50 PIC S9(5)V USAGE COMP-3.
10 ATTRIBUTE-F OCCURS 50 PIC X(8).
10 ATTRIBUTE-G OCCURS 50 PIC S9(11)V USAGE COMP-3.
I tried to define the index as follows:
And access the elements as follows:
DISPLAY ATTRIBUTE-A (INX-B)
But it doesn't really work. I get the following errors:
"INX-B (INDEX DATA ITEM)" was compared with "10". The comparison was discarded.
Not enough subscripts or indices were specified for "ATTRIBUTE-A". A subscript or index value of 1 was assumed
for each missing subscript or index.
How does this thing work with the indices declared on level 77??
BTW, I'm working with the Cobol Enterprise Z-OS compiler 3.4.1