Re: Dynamic memory in standard COBOL; using large data fields




"clvrmnky" <clvrmnky-uunet@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:aR%me.8324$5u4.27086@xxxxxxxxxxxxxxxxx
> My review of available literature seems to indicate that COBOL-85 does
> not support the notion of dynamic memory. That is, there is no standard
> malloc or calloc style keywords or calls I can make to allocate and grow
> a hunk of memory for an application.

Indeed, ANSI X3.23-1985 provides neither standard syntax nor standard
functions to provide this capability. Nor does ISO/IEC 1989:2002.

The COBOL standard being developed for approval in 2008 includes in the
current draft both "any-length elementary items" and "dynamic-capacity
tables", alone or in combination. This isn't so much based on the C or
Pascal models of the "heap" as it is oriented toward adding true
variable-length capabilities to existing COBOL applications.

-Chuck Stevens


.



Relevant Pages

  • Re: Dynamic memory in standard COBOL; using large data fields
    ... The '02 Standard *does* introduce the ALLOCATE and FREE statements to do what ... > The COBOL standard being developed for approval in 2008 includes in the ... > variable-length capabilities to existing COBOL applications. ...
    (comp.lang.cobol)
  • Re: What could J4 (or WG4) do
    ... COBOL syntax (and the COBOL standard) that's being done at Vrije ... and limiting the description of the language to ...
    (comp.lang.cobol)
  • Re: INSPECT and TRAILING syntax
    ... anyone to implement a COBOL compiler compliant with the 2002 standard. ... that are being incorporated into the 2008 draft *without* going through the ... revision to IEEE 754) that is *outside of the COBOL standard* resolves one ... but I think that feature is a fundamental improvement to the ...
    (comp.lang.cobol)
  • Re: Avoiding Logic Error?
    ... When we say "the Standard" - we must specify which one. ... The ISO 2002 COBOL standard *does* allow an IF NUMERIC class test against either ...
    (comp.lang.cobol)
  • Re: moving data from one place to another in a text file
    ... absent from any prior COBOL standard is factually "old syntax" when the ... What did the authors of these particular portions of the 2002 standard have ...
    (comp.lang.cobol)