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

Answers were Sorted based on User's Feedback



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

Answer / suresh ramaiyan

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

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

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

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

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

Post New Answer

More COBOL Interview Questions

Difference between cobol and cobol-ii?

0 Answers  


in real time what is the suitable exp where in-stream procedure is better then catalog procedure.

1 Answers  


what is a load module ?

3 Answers   TCS,


What is the difference between structured cobol programming and object alternativelyiented cobol?

0 Answers  


diffrence between renames and redifnes with examples

3 Answers   IBM,






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?

4 Answers  


Can we access the a[0] in the array ?

6 Answers   DCL, IBM,


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?

2 Answers   Satyam,


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

0 Answers   EDS,


Discuss about changing dataset name in proc.

0 Answers  


Can the OCCURS clause be at the 01 level?

2 Answers  


What is difference between COBOL and VS COBOL II?.

1 Answers   Winsol Solutions,


Categories