IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamic array in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Tue Apr 04, 2006 7:57 pm
Reply with quote

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
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 04, 2006 8:15 pm
Reply with quote

hy sudhee_rb,

use OCCURS with DEPENDING ON...

martin9
Back to top
View user's profile Send private message
ankur.sanghi

New User


Joined: 05 Apr 2006
Posts: 3

PostPosted: Thu Apr 06, 2006 5:09 pm
Reply with quote

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
View user's profile Send private message
ranga_subham

New User


Joined: 01 Jul 2005
Posts: 51

PostPosted: Fri Apr 07, 2006 8:44 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top