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

How do you define a variable of comp-1 and comp-2?

0 Answers  


Difference between next and continue clause

4 Answers   Kanbay,


What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......

3 Answers   BirlaSoft,


in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......

2 Answers   IBM,


how many divisions are there in cobol

3 Answers   ADP,






COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'

8 Answers   Barclays, IBM,


How do u sort the table for Search ALL? Is it only using ASCENDING KEY IS statement in occurs clause? If the data is input in non ascending order, will the ASC KEY IS automatically sort the data? or will it throw compile time error?

1 Answers   CTS,


consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

5 Answers   TCS,


I have 100 records in a file.. i want to sort the records from 5 to 5o... give the syntax...

2 Answers   CTS, DSRC,


consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error

6 Answers   ABCL, TCS,


what is Reentrancy and Quasi-reentrancy?

1 Answers  


if a>b continue display x. dispaly y. end-if display 1 display 2. display 3. what should be my output ?

3 Answers  


Categories