View previous topic :: View next topic
|
Author |
Message |
sudhee_rb
New User
Joined: 29 Mar 2006 Posts: 34
|
|
|
|
Hi
This is sudheer
is there any concept dynamic array in cobol.
how can i use dynemic array
where can we use?
bye |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy sudhee_rb,
use OCCURS with DEPENDING ON...
martin9 |
|
Back to top |
|
|
ankur.sanghi
New User
Joined: 05 Apr 2006 Posts: 3
|
|
|
|
Hi guys,
This question was put to me in an interview. I replied the same. But the interviewer then explained that when we use DEPENDING ON, the memory is actually allocated for the maximum length.
In that sense, there is no dynamic memory allocation in cobol and hence no dynamic arrays in Cobol.
Hope that clarifies!!
ankur |
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
Quote: |
when we use DEPENDING ON, the memory is actually allocated for the maximum length.
|
Whatever the interviwer told to you was true only. But, not every time you load the full length of the dynamic array. Whenever the depending variable gives you some value then depending on that value only array will be loaded. Ok. |
|
Back to top |
|
|
|