How To move a value to an array using move verb?
Answers were Sorted based on User's Feedback
one correction in Jagan's answer..
MOVE 1 to A(I)
we should not use [] for array in cobol.
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / jagan
using PERFORM statements we can move a value to an array
using the MOVE verb.
Below is an example of In-Line Perform where we are moving
a value to an array A
01 Array
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
Is This Answer Correct ? | 14 Yes | 3 No |
Answer / r
In continuation with first answer below code need to be
added in
01 Array
05 A PIC X(10) occurs 10 times.
CODE: 01 ARRAY
05 A PIC X(10) OCCURS 10 TIMES INDEXED BY I.
Is This Answer Correct ? | 0 Yes | 1 No |
Difference between cobol and cobol-ii?
in real time what is the suitable exp where in-stream procedure is better then catalog procedure.
what is a load module ?
What is the difference between structured cobol programming and object alternativelyiented cobol?
diffrence between renames and redifnes with examples
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?
Can we access the a[0] in the array ?
what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Discuss about changing dataset name in proc.
Can the OCCURS clause be at the 01 level?
What is difference between COBOL and VS COBOL II?.