60229400
Format 2:
The contents of index-name-4 (and index-name-5, if specified) are incremented
(UP BY) or decremented (DOWN BY) a value that corresponds to the number of
occurrences represented by the value of literal-2 or identifier-4. Identifier-4
must be a data name identifying a numeric elementary item with no positions
to the right of the assumed decimal point.
Example:
DA TA DIVISION.
77
B-1 PIC 99 USAGE IS INDEX.
77
D-l PIC 9 USAGE IS INDEX.
01
ABLE.
02
BAKER OCCURS 20 TIMES INDEXED BY INDX-B.
03
C!LARLIE PIC
9
(3) .
03
DOG PIC X(3) OCCURS 5 TIMES INDEXED BY INDX-D.
PROCEDURE DIVISION.
M-l.
SET B-1 TO INDX-B.
M-2.
SET D-l TO INDX-D.
IF CHARLIE (B-1) LESS THAN 100,
MOVE DOG (B-1, D-l) TO TABLE-D.
IF INDX - B GREATER THAN 20; GO TO OUT.
IF
INDX-D LESS THAN
6;
SET INDX-D UP BY 1; GO TO M-2;
ELSE SET INDX-D DOWN BY 5, GO TO M-l.
OUT.
4-63
Need help?
Do you have a question about the 3300 and is the answer not in the manual?