Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - How To move a value to an array using move verb?




450
views
asked mar September 10, 2014 11:07 AM  

How To move a value to an array using move verb?


           

1 Answers



 
answered By Mswami   0  

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 
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


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!

Alert