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 |
how will you define vsam file in select clause?
88 class is used for
How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?
What is the use of LINKAGE SECTION?
Why occurs can not be used in 01 level ?
How can you submit a job from COBOL programs?
what r the types of perform statement
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
Can you please let me know the centre name of INS certification in Kolkata.
What is the purpose of Identification Division?
What is tne need to use sub programs in Cobol?
Explain about level numbers?