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

Is my concept correct wrt static and dynamic call.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Sat Nov 29, 2008 11:00 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Nov 29, 2008 11:14 pm
Reply with quote

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
View user's profile Send private message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Sat Nov 29, 2008 11:27 pm
Reply with quote

Thank you icon_biggrin.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Nov 30, 2008 12:54 am
Reply with quote

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
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon Dec 01, 2008 1:04 pm
Reply with quote

Hi,

Here is a link which gives detailed info on these calls.

All about static and dynamic call

Hope this helps.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top