so I am just starting to learn COBOL on Z/OS. I have done quite a bit using visual cobol; however, this is still quite different.
I need to display a table starting at the Index of 1 and displaying until the index is 50
PERFORM VARYING W03-SUBJ-INDX FROM 1 BY 1
UNTIL W03-SUBJ-INDX = 50
DISPLAY W03-SUBJ-TABLE
END-PERFORM
That is what I currently have I also tried
PERFORM VARYING W03-SUBJ-INDX FROM 1 BY 1
UNTIL W03-SUBJ-INDX = 50
DISPLAY W03-SUBJ-TABLE(w03-subj-indx)
END-PERFORM
The top example displays only the first indexed item (To be expected) - The second example gives me an error stating ")" was unexpected.
Any help would be appreciated.. I was told I have to use the index
W03-SUBJ-TABLE
? - cschneid