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

In which area will you utilize 88 level items in cobol?

0 Answers  


Which division and paragraphs are mandatory for a COBOL program?

0 Answers  


What is the difference between SEARCH and SEARCH ALL?

6 Answers   Cognizant,


Why do we use COMP-3 variables for computation, when we know that they are non displayable fields and require additional MOVE to numeric field before we populate it in output Reports?

1 Answers   Accenture,


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  






Can we move X(9) to 9(9). If yes what are the ways for doing this?

3 Answers  


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


wht is structured cobol pgm and non structred cobol pgm ?

1 Answers   CTS, DELL,


What is an index for tables?

2 Answers  


Name the divisions, which are available in a cobol program?

0 Answers  


) How do u handle errors in BMS macro?

0 Answers   IBM,


Why IBM?

1 Answers   IBM,


Categories