View previous topic :: View next topic |
Author |
Message |
deeptik Beginner
Joined: 16 May 2008 Posts: 8 Topics: 4
|
Posted: Fri Sep 11, 2009 1:19 am Post subject: ARRAY OCCURS CLAUSE |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Sep 11, 2009 7:11 am Post subject: |
|
|
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 |
|
|
Anuj Dhawan Intermediate
Joined: 19 Jul 2007 Posts: 298 Topics: 7 Location: Mumbai,India
|
Posted: Wed Sep 16, 2009 11:42 pm Post subject: |
|
|
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 |
|
|
|
|