Page 1 of 1

lifetime of modules in an IMS message region

PostPosted: Tue May 17, 2011 9:46 pm
by Mike1304
Hello,

can anybody explain to me, when a module is deleted in an IMS message region?
All modules are dynamically loaded.
Normally, I can load and delete a single module A and this has no effect to modules, that are loaded by module A.

But in an IMS messige region (if the "main application program" is not preloaded) all modules are deleted, when the "main application program" is deleted.
Only if a module is loaded more than one time it stays in the main storage.

How does this cascading deletion of modules work?
What is so special with this "main application program", which attribute causes the deletes?

Mike

Re: lifetime of modules in an IMS message region

PostPosted: Wed May 18, 2011 11:59 am
by Mike1304
I found some more information:

The "main application program" is the program defined for the transaction code.
This program is "called" by LINK.
LINK loads the module and branch to it and after get back control, it deletes the program.

Still unclear is for me, why all the other programs loaded and BASR 14,15 are "automatically deleted".

Re: lifetime of modules in an IMS message region

PostPosted: Thu May 19, 2011 9:57 am
by Mike1304
more information:

the main application program is the first cobol program.
Therefore a LE environment is created and after the GOBACK in the main application program LE environment is deleted.
All programs known by LE are deleted. LE knows all sub programs called from LE programs.

still, I have a question:
We use the APPLFE= parm to get control, when the region starts, before every main application program and on termination of the region.
The APPLFE program is a non LE assembler.
Since we use this APPLFE, the sub program are no longer deleted, I think the LE environment is not deleted any more.
Why?