On Mar 14, 2:54 am, "Michael Mattias" <mmatt...@[EMAIL PROTECTED]
> wrote:
> In the grand scheme of things, does it really matter if ODOs are
allocated
> dynamically or statically?
If everytime the DO changed a realloc() was done, then yes, it
certainly would matter. realloc()s are notoriously, and necessarily,
slow. You would have to (re)write the program in a way that minimised
the changes to the DO.
> Seems to me as long as there are "n" occurences available where
n=current
> value of DEPENDING ON variable, the applications programmer doesn't care
a
> hoot about the allocation strategy employed by the publisher.
ODO originated for data records to save space on tape based systems.
There it _does_ change the actual size of the record on the tape, or
(much later) disk files. Its application to Working-Storage was
primarily to cater for READ INTO and WRITE FROM where the W-S area
_needed_ to be 'full size' so that the record could be added to.
Note that a DO embedded in a record would set the ODO _after_ an INTO
had moved the complete data record from the FD record area. Dynamic
allocation is not an option.
The fact that much later SEARCH (1974) and table SORT (2002) use ODO
is merely for convenience of not having to invent another feature to
do this.
> True, that publisher's strategy may - and perhaps should - figure into
your
> evaluation of "which" COBOL compiler to use, but once that decision has
been
> made it's immaterial.


|