Well, that's not true.  It's also useful if you want some fields to be 
initialized each time a sub-program is called (local-storage with value 
clauses) and some fields to have the same value as when the previous call to 
the function returned (working-storage).

________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Schmitt, Michael <[email protected]>
Sent: Wednesday, September 2, 2026 8:57 AM
To: [email protected] <[email protected]>
Subject: Re: When did Enterprise COBOL first get LOCAL-STORAGE?

There was no point to local-storage before you could do recursive calls to a 
program, i.e. same program more than once in the calling chain:

   Program-id. <prog_name> is recursive.

When did we get that? In same COBOL for MVS & VM release?

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Charles Mills
Sent: Tuesday, September 1, 2026 7:59 PM
To: [email protected]
Subject: Re: When did Enterprise COBOL first get LOCAL-STORAGE?

Well, looking a little further I see LOCAL-STORAGE in COBOL for MVS & VM, 
V1R2M2. November 9, 1998.

FRONT_2.1 Major Changes in Release 2:

"LOCAL-STORAGE SECTION. A separate copy of data defined in the LOCAL-STORAGE 
SECTION is created each time a program is called or method is invoked. The data 
is freed when the program or method returns."

We mainframers don't rush into these new-fangled features.

Charles

On Tue, 1 Sep 2026 19:48:14 -0500, Charles Mills <[email protected]> wrote:

>I just happen to have about every IBM COBOL publication from the last 30-40 
>years because I have a client that is in the COBOL business.
>
>Enterprise COBOL 2.1 from September 2000, Summary of Changes:
>
>Local-Storage Section ("Format 5: SET for USAGE IS POINTER data items"  in 
>topic 6.2.33.5)
>
>Section 5.1.3 Local-Storage Section has all change bars down the side.
>
>Charles
>
>On Tue, 1 Sep 2026 22:13:36 +0000, Farley, Peter <[email protected]> 
>wrote:
>
>>Asking here rather than on CICL-L since this is more about COBOL than CICS.
>>
>>This question occurred to me today as I was revising some rather old CICS 
>>COBOL code that uses GETMAIN'ed storage areas because I think the implementor 
>>wanted to make those particular storage areas unique to a given invocation of 
>>this program (which is called often within a long-running CICS task).  It 
>>seems to me that LOCAL-STORAGE provides the same benefit with no overhead but 
>>additional stack space (the dynamic areas are under 30K bytes in total).
>>
>>I just became curious as to when this language feature was introduced.  I 
>>suspect that it was a considerable time after this program was designed and 
>>implemented (which was well before my time here started).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to