Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DYNAMIC CALL

Status
Not open for further replies.

ramgarra

Programmer
Apr 1, 2003
6
0
0
BO
Could anyone help me....I want to know how to make a dynamic call, I have a memory problem when one program calls to another this program loaded into the memory of the first one and still there until you goes out the program, I have an application, where I have for about 1500 users so I became to have some problems with the memory

thanks

 
Operating system? mainframe, unix, ??
Compiler? Tom Morrison
 
I´m working with a SunOS argos 5.6 Generic_105181-30 sun4u sparc SUNW,Ultra-Enterprise
and MF COBOL.

 
This is most likely something that is best answered by Micro Focus. Micro Focus has several different ways of aggregating all the programs in a run unit. Some involve static linking, some not. I am not able to answer any Micro Focus question with authority.

My [red]guess[/red] is that you should stay in interpretive mode (do not compile to native code) and be sure to CANCEL programs when you return to the calling program, viz:
CALL "PROGA" USING ....
CANCEL "PROGA"
Note that this can be quite a bit of work to do so for your entire set of programs.

Again, I cannot offer expert help on Micro Focus. If you do not get an answer here, try the "Micro Focus solutions" forum.

Tom Morrison
 
Hi ramgarra,

MicroFocus has a difference between a logical and a physical cancel. The standard behaviour is a logical cancel:
the canceled program stays in memory and so the following calls are much faster, but the programs data is initialized again.
During a physical cancel the program is unloaded from memory, so on the next call it has to be reloaded from disk, which needs more time. If you really want a physical cancel, i believe you can use the runtime switch '-l0'. This switch is available in Object Cobol, i don't know about Server Express.

Regards, Torsten
 
In the Micro Focus world, how call cancel works depends a lot on how the system was linked. There are choices.

Static Link - This links all the modules and a run time system into a single exe

Shared Link - This allows you to link modules separately and uses the run time system externally.

Build - This is a micro focus method that contains many advantages including the ability to re-locate modules in memory after call cancels.

If you are doing a shared or a static link using 'cob', I would suggest that you look very carefully at the parameter options (type cob with no parameters at a command prompt).

Clearly if you are trying to call a module that has been statically linked, you will be trying to load a new runtime system each time which will cause you to run out of memory pretty fast.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top