How do define Dymanic array in cobol how do u define single
demensional arry and multidymensional arry in ur cobol.
Answers were Sorted based on User's Feedback
Answer / billyboyo
In IBM Cobol
1) In IBM's Language Environment you can dynamically
acquire storage (look up HEAP in the manual). The storage
you acquire you can use as you like. Can be an array,
therefore a dynamic array. It is a "work-around" as dynamic
arrays are not directly supported.
2) 01 SINGLE-DIM-ARRAY
05 SDA-ITEM PIC X OCCURS 30.
A single-dimension array of thirty one-byte characters.
3) 01 MULTI-DIM-ARRAY.
05 MDA-FIRST-DIM OCCURS 20.
07 MDA-SECOND-DIM OCCURS 30 PIC X.
A multi-dimension array of 20 times 30 one-byte characters.
| Is This Answer Correct ? | 4 Yes | 1 No |
single dimensional array-
01 year grp.
05 month pic 9(2) occurs 12times.
multi dimensional array
01 year grp.
05 month occurs 12times.
05 weak occurs 4 times.
05 days pic x(4) occurs 7 times.
dynamic array-
01 yy grp.
05 month pic x(4) occurs 10-12 times depending upon 'yygrp'.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / mr.perfect
dynamic array is used to accept the value based on the
random value
dynamic array-
01 yy grp.
05 month pic x(4) occurs 10 times depending upon IDX
IDX is variable name
01 idx pic x(1).
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kalyan.p430
sorry i cant understand what is dynamic array?......pls
anyone explain to me
| Is This Answer Correct ? | 0 Yes | 0 No |
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
can any one give good example for cond 88 level number and for renames pls urgent dudes ?
Can anybody give me example of subscript and index
How to covert given string into ASCII value in COBOL/MF COBOL
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.
01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy
HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER
what is meant by binary search?
What does the IS NUMERIC clause establish ?
) What is the use of IGNORE?
Whats the use of Examine command? can someone help me?