can u plz expain me how to declare dynamic array? what is
the meaning of depending on clause in dynamic array?

Answers were Sorted based on User's Feedback



can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dy..

Answer / amarnadh reddy

When a table of variable size is required, the occurs
depending clause may be used.

01 A1 PIC 99.
01 REC-1.
05 P1 PIC XX.
05 P2 PIC 99 OCCURS 1 TO 90 TIMES DEPENDING ON A1.

Here depending on the value of the data name A1 the size of
P2 Will be decided. It can be anything between 1 and 90.

Is This Answer Correct ?    31 Yes 4 No

can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dy..

Answer / roger riek

You can indeed create dynamic arrays in MVS Cobol. You need
to use the heap facility in the language environment.
There is a discussion about how to do this at
http://home.centurytel.net/rjriek/

Is This Answer Correct ?    0 Yes 1 No

can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dy..

Answer / kk

dynaic array is notink but a two dimension array.

01 studet.
02 stunam occurs 3 to 4 times depanding on n.
03 stuname pic x(15).
03 stumrk occurs 2 times.
04 stumark pic 9(3).
this is dynamic array.now runtime will pass the input.because
using depanding clause.

depanding clause pass the value runtime.

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More COBOL Interview Questions

Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,


How can you pass values from COBOL program to non-COBOL programs?

2 Answers  


if one main program ,n -subprograms are then which call you follow ?why reasonuhg

4 Answers   UHG,


how do u indetify files succesfully executed or not ?

4 Answers   TCS,


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  






How do you define a variable of COMP-1? COMP-2?

3 Answers  


What do you feel makes a good program?

2 Answers  


I have a File that has duplicate records. I need only those records that occur more than thrice.?

3 Answers   IBM, Wipro,


OCCURS clause is used in the DATA DIVISION on data names at (a) 01 level (b) 77 level (c) 88 level (d) any level from 02 to 49

13 Answers   TCS,


what is the use of comp2 ? where can we use it with example ?

3 Answers   Covansys,


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?

1 Answers  


how can we code index in an array of cobol pgm?

1 Answers   Wipro,


Categories