View previous topic :: View next topic
|
Author |
Message |
Daniel Prosser
New User
Joined: 05 Nov 2010 Posts: 57 Location: Amsterdam
|
|
|
|
Hello,
I have a simple question really - at what point does IMS release the working storage allocated by a particular program/module.
We have a large transaction with a large calling chain, I would imagine that when a COBOL program in the calling chain returns control to the calling module the storage allocated is released.
Though this doesn't seem to be happening.
Can anyone point me in the right direction?
Dan.
|
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
i am sure IMS experts will be able to provide the right answer.
Working in IMS environment for sometime now, my understanding is that the storage is released only after the transaction ends (UOW) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Unless you do a CANCEL in the COBOL program, a called subprogram will remain in memory until the end of the task (i.e., job if running in batch). This is standard and typical COBOL behavior; I doubt there's much difference due to IMS. |
|
Back to top |
|
|
Daniel Prosser
New User
Joined: 05 Nov 2010 Posts: 57 Location: Amsterdam
|
|
|
|
Well it's an IMS transaction but I assume the principal is the same.
I'll have to look for a solution, thanks for your replies. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Daniel Prosser wrote: |
I have a simple question really - at what point does IMS release the working storage allocated by a particular program/module. |
Your program is "conversational" or "non-conversational". I know it's IMS DC question not CICS but that answer will help to get in some direction. |
|
Back to top |
|
|
Daniel Prosser
New User
Joined: 05 Nov 2010 Posts: 57 Location: Amsterdam
|
|
|
|
Its conversational.
I thought that when you call a module (B) and control is returned to the calling module (A) the storage used by B is free'd.
Evidence seems to point the other way though. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Click on the IBM Manuals link at the top of this page, find the Enterprise COBOL Language Reference manual and read section 5.1.3 on Local-storage. The behavior you seem to be expecting appears to be very similar to LOCAL-STORAGE, not WORKING-STORAGE. |
|
Back to top |
|
|
Daniel Prosser
New User
Joined: 05 Nov 2010 Posts: 57 Location: Amsterdam
|
|
|
|
Thanks Robert, Your absolutely correct. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Robert is correct. OTOH, for IMS/DC, if this program is a "conversational" - it'll have a SPA (Scratch Pad Area). In IMS/VS conversational processing, a work area in main storage or on direct access storage used to retain information from the application program for executions of the application program from the same terminal -- I believe, this is what you're calling as "working storage allocated by a particular program/module".
For a 'transaction', (pseudo conversational) program releases working-storage upon each event/PF key.
OTOH, SPA is an obselete concept now. Get rid of it, if you can. |
|
Back to top |
|
|
Daniel Prosser
New User
Joined: 05 Nov 2010 Posts: 57 Location: Amsterdam
|
|
|
|
Thanks everyone. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You're welcome and Good Luck! |
|
Back to top |
|
|
|