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

what is MSGLEVEL?

1 Answers   IBM,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


is this below syntax correct? CALL 'subprg' using A,B Please help

2 Answers  


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


What care has to be taken to force program to execute above 16 Meg line?

1 Answers  






is it possible to pass an SQL query inside a jcl which is inside a cobol program?

4 Answers   CTS,


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

2 Answers   ADP,


how to access vsam files in cobol and how to differentiate that this is ESDS file

1 Answers   EDS,


how we can edit records in vsam data set and non vsam data sets

2 Answers   ACS,


If i initialize the 01 level variable in array, will it initialize all the array elements (occurs)?

8 Answers   CTS,


which is better comp or comp-3 in terms of memory utilization?

6 Answers  


if we have a 10 steps how to override the 4th step in jcl?

2 Answers   Hewitt,






Categories