Below examples illustrates:
01 ARRAY1. 02 ARRAY2 PIC 99 OCCURS 5 TIMES INDEXED BY I. PROCEDURE DIVISION. MOVE LOW-ELEMENT TO ARRAY2 [ I ]. MOVE HIGH-ELEMENT TO ARRAY1. 01 Array1 05 A PIC X(10) occurs 10 times. .... PERFORM VARYING i from 1 by 1 until i > 10 MOVE 1 TO A[I] END-PERFORM
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!