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 |
if a file has 1000 recods how copy the records from 1 to 100 records using sort
which generation language is cobol
Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.
What does EXIT do ?
how to convert the recors form vsam file to db2 table tru file aid
How do you define a variable of COMP-1? COMP-2?
Difference between cobol and cobol-ii?
which one is the best of com and com-3.using of real time ?
What is Static,Dynamic linking ?
what are the working storage fields in BMS macro?
Explain how you can characterize tables in cobol?
How to Pass table from a cobol program to another cobol program and how to use that table in called program