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 |
In which area will you utilize 88 level items in cobol?
Which division and paragraphs are mandatory for a COBOL program?
What is the difference between SEARCH and SEARCH ALL?
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?
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
Can we move X(9) to 9(9). If yes what are the ways for doing this?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference
wht is structured cobol pgm and non structred cobol pgm ?
What is an index for tables?
Name the divisions, which are available in a cobol program?
) How do u handle errors in BMS macro?
Why IBM?