MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ARRAY OCCURS CLAUSE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
deeptik
Beginner


Joined: 16 May 2008
Posts: 8
Topics: 4

PostPosted: Fri Sep 11, 2009 1:19 am    Post subject: ARRAY OCCURS CLAUSE Reply with quote

Hi,

I want to understand the advantage that the OCCURS DEPENDING ON clause provides over a normal OCCURS clause.

Does the OCCURS DEPENDING ON clause save in terms of memory as the array size would depend on the count provided in the DEPENDING ON clause or is the array size a constant in both the cases.


Thanks in advance
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Sep 11, 2009 7:11 am    Post subject: Reply with quote

Is it really too difficult to look at a Programmers Guide?

COBOL allocates the maximum memory potential for ODO's. so answer to your last question is if both tables have the same item size and max occurances (fixed is 100 and ODO is 1 to 100), then yes the allocated memory is the same.

ODO's are handy with variable length files - don't have to calculate the VLI, COBOL can do it.
ODO's enable efficient SEARCH and SEARCH ALL instructions.

RTFM, Links at top of page.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Wed Sep 16, 2009 11:42 pm    Post subject: Reply with quote

COBOL OCCURS DEPENDING ON typically does not dynamically allocate storage -- the data structure is defined as the maximum amount of memory that could be needed. The only exception is an ODO that is part of an 01 variable in an FD.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group