How to define a array dynamically.....

Answers were Sorted based on User's Feedback



How to define a array dynamically.......

Answer / samay simant

Use the Occurs Depending on clause.

01 College-table
05 Student-table occurs 10 to 20 times depending on
NUM_Stud.

Here the size of array is dependent on Number of students.
Thus this is dynamically created.

Is This Answer Correct ?    5 Yes 1 No

How to define a array dynamically.......

Answer / billyboyo

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.

Is This Answer Correct ?    2 Yes 0 No

How to define a array dynamically.......

Answer / mahesh

hi pandu
occurs clause is used to define the tables so in
01 we mention the group so it does not any pic clause
even sub groups are also not having a pic clause
only elementary items contain pic clause

Is This Answer Correct ?    1 Yes 0 No

How to define a array dynamically.......

Answer / pandu

hi Samay,your answer is correct but i had doubt why don't
we write it as
01 College-table
05 Student-table occurs 10 to 20 times depending on
NUM_Stud.
because 01-49 all are group items naa.
and why don't we mention pic clause in above 01 and 05

pls tell me naa.

Is This Answer Correct ?    0 Yes 0 No

How to define a array dynamically.......

Answer / mehak

use
ocuurs 1 to 100
depending on ws-counter

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

What is XDC ?

3 Answers   Cap Gemini, IBM,


I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??

2 Answers   HCL,


)what is retrieve?

1 Answers   IBM,


88 class is used for

5 Answers   CTS, EDS,


What is the difference between binary search and sequential search?

0 Answers  






can we use reference modification an arry.

1 Answers  


What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad

8 Answers   Syntel,


i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19

2 Answers  


What is Control Break processing ?

1 Answers   iGate,


How can you add a particular field in copybook?

2 Answers   L&T,


How do u initialize an array?

2 Answers   CTS,


How can you get the ksds file records into your cobol program?

0 Answers  


Categories