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



How do define Dymanic array in cobol how do u define single demensional arry and multidymensional ..

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

How do define Dymanic array in cobol how do u define single demensional arry and multidymensional ..

Answer / mahesh

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

How do define Dymanic array in cobol how do u define single demensional arry and multidymensional ..

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




How do define Dymanic array in cobol how do u define single demensional arry and multidymensional ..

Answer / kalyan.p430

sorry i cant understand what is dynamic array?......pls
anyone explain to me

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More COBOL Interview Questions

I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)

2 Answers   Keane India Ltd,


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


What does the initialize statement do ?

2 Answers  


how will u code parm parameter and where pls ?

3 Answers   DELL,






can i use multiple when statements in search & search all ? justify ur answer?

2 Answers  


can I copy book which contain db2 statment in procedure divion?

2 Answers   Bank Of America,


why do u need inspect verb?

3 Answers   Patni,


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


if you give cylinder(1,1)how many cylinders it will be allocate?

3 Answers   Hewitt,


01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??

1 Answers  






Categories