01 TABLE1.
05 TABLE-1 OCCURS 4 INDEXED BY T1.
10 SNUM PIC X(4).
10 SNAME PIC X(30).
10 GRADES OCCURS 3 INDEXED BY G1.
10 FGD PIC 999V99.
05 TABLE-1 OCCURS 4 INDEXED BY T1.
10 SNUM PIC X(4).
10 SNAME PIC X(30).
10 GRADES OCCURS 3 INDEXED BY G1.
10 FGD PIC 999V99.
first question, is there something wrong with this table? can i also index the second table?
can i also use the code given below, or will it cause an error or abend?
MAIN-RTN
.
.
.
.
.
.
PERFORM 100-PRINT-RTN VARYING FROM 1 BY 1
WHEN T1 > 4
AFTER G1 > 3
.
.
.
.
.
.
.
100-PRINT-RTN SECTION.
100-PRINT.
MOVE SNUM(T1).
MOVE SNAME(T1).
MOVE GRADE(T1 G1).
MOVE FGD(T1).
100-EXIT.
EXIT.
.
.
.
.
.
.
PERFORM 100-PRINT-RTN VARYING FROM 1 BY 1
WHEN T1 > 4
AFTER G1 > 3
.
.
.
.
.
.
.
100-PRINT-RTN SECTION.
100-PRINT.
MOVE SNUM(T1).
MOVE SNAME(T1).
MOVE GRADE(T1 G1).
MOVE FGD(T1).
100-EXIT.
EXIT.