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 strongm 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
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

 
More information is needed. What version? Are you doing a build or a link? If a link Are you doing a shared or a static link? Clive
 
MF cobol v4.1.20-e, with OS SunOS argos 5.6 Generic_105181-30 sun4u sparc SUNW,Ultra-Enterprise. I´m just doing a CALL: like this

MOVE "ETESP001.int" TO WS-PROGRAM
CALL WS-PROGRAM USING WS-ETESP001-LNK
CANCEL WS-PROGRAM

This programs the one that call and the other one that is being calling are compile with "cob" from MF COBOL.
 
I'm not sure about your OS and MF version.
On AIX 4.3 and Server Express 2.0.11 you can compile you programs into ".so" modules (shared object).
These are called and managed by the OS. When you compile into ".int" or ".gnt" the call is done by cobol (cobrun).

The advantage of ".so" modules is that the program resides in memory once, while more processes are using them. You don't have to worry about your Working Storage having values from another process. This can only happen when you write multithreaded programs. In that case multiple threads share the Working Storage of a shared object.
So they invented the Local Storage section.

To try it just compile using cob -z. Take out the ".int" extension in your call-verb.
 
Hi ramgarra,

have a look at your post in 'cobol general discussion':
thread209-514731
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top