IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Clean up of external variables.


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Tue Nov 17, 2009 2:47 pm
Reply with quote

Hi all,
A Cobol external variable is alive while the run unit that it belong to is alive.
So in a batch job the storage reserved for the external variable will be available during the live of the batch job and this area will be freed when the job ends.

But what is the case when the cobol program is executing under IMS?

The run unit under IMS finish when IMS is stopped, so how can a external varialbe in IMS storage be refreshed without shut down IMS?
Suppose that you want to increas the size of a external varialbe already in IMS storage, how it can be done?

Regards.
Casmir. icon_redface.gif icon_redface.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 17, 2009 8:41 pm
Reply with quote

Hello,

As there have been no replies, i moved this topic to the IMS part of the forum.

Please let me know later if you'd rather it be put back in the COBOL part of the forum.
Back to top
View user's profile Send private message
Gary Jacek

New User


Joined: 17 Dec 2007
Posts: 64
Location: Victoria, BC, Canada

PostPosted: Tue Nov 24, 2009 2:39 am
Reply with quote

Hello Casmir

If your application with EXTERNAL variable is running as an IMS MPP, then you need to know more about IMS transaction scheduling and program load to answer this question.

When the IMS transaction scheduler has chosen a MPR (Message Processing Region) for your transaction, in the simplest case, the MPR will load your application load module from //JOBLIB, //STEPLIB or LINKLIST.

Your application gets control, uses GU to IOPCB to get and process all input transactions for this application load module, gets a QC status code on the final GU to the message queue, and terminates.

At this point, your load module -MAY- be retained in MPR storage.

If the application load module is linked as REUSable, it may remain in the MPR-allocated storage until space is needed to load some other application load module(s).

If the application load module is on the MPR Preload List (IMS.PROCLIB member DFSMPLxx) and is linked REUS, then it is loaded once when the MPR starts and remains in storage until the MPR shuts down, hours, days or weeks later.

In a code/test and bomb environment, you could link your application as NON-REUSABLE in order to force a module load every time. This will allow you to change your EXTERNAL variables (and other code) and see the results immediately.

Once you have optimized your code, relink your application as REUSable in order to complete module reusability testing. This step is critical.

In production, you definitely want to link REUSABLE as program load is costly and slows down production IMS.
Back to top
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Mon Nov 30, 2009 2:05 pm
Reply with quote

Hi Gary,
Many thanks for your convincing answer.

Regards.
Casmir.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
No new posts REXX - Adding variables CLIST & REXX 8
Search our Forums:

Back to Top