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

Name some of the examples of COBOl 11?

0 Answers   CSC,


is it possible to rename 01 level?

4 Answers  


Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.

0 Answers   RBS,


how to access the file from prodution from changeman tool and to submit a file to production

1 Answers   IBM,


What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   RBS,






What does EXIT do ?

3 Answers   Deloitte,


How to read the last 100 records from a COBOL file. The file contains N number of records.

11 Answers   IBM,


which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


where do u use low-value and high value in cobol

3 Answers   CGI,


I want ALL ERROR codes in VSAM

3 Answers   American Express, TCS,


why do u need inspect verb?

3 Answers   Patni,


give the examples for strings and unstrings in cobol

2 Answers   IBM,






Categories