View previous topic :: View next topic
|
Author |
Message |
arindambanerjee
New User
Joined: 30 Jun 2007 Posts: 39 Location: India
|
|
|
|
I am bit confused with my concept regarding static and Dynamic call in COBOL. I am describing my concept below. Please let me know if it is correct or should it be other way round.
Static Call:- It is a call to a program which will be link edited with the main program.
Dynamic call:-It is an independent program which is link edited separately. The main program just call this program[/u] |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Arin,
Your concept is correct. The info below may be of some interest.
***********************************************************************
Static vs Dynamic CALLs
***********************************************************************
If compiled as NODYNAM:
CALL 'literal' is a static call
CALL WS-label is a dynamic call
If compiled as DYNAM:
CALL 'literal' is a dynamic call
CALL WS-label is a dynamic call
At execution time, to tell from the CALLee, if the CALLer was static:
Go 1 save area back
At execution time, to tell from the CALLee, if the CALLer was dynamic:
Go 2 save areas back |
|
Back to top |
|
|
arindambanerjee
New User
Joined: 30 Jun 2007 Posts: 39 Location: India
|
|
|
|
Thank you |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Beware of Static Calls in CICS as the Callee's WS is similar to program-storage in Assembler and is therefore, non-reentrant (part of the load module) and susceptible to nearly simultaneously usage and unpredictable results. If the Caller is defined as THREADSAFE and perform's a Static Call then this will fail within seconds of usage.
To deal with this, have the reentrant/serially reusable Caller pass its own storage to the Callee as a parameter and this should all but eliminate any issue with concurrent tasks attempting to use the Callee's same Static WS.
Regards,
Bill |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
Back to top |
|
|
|