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

What is static and dynamic linkage


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

New User


Joined: 10 Oct 2005
Posts: 5

PostPosted: Fri Jan 13, 2006 10:20 am
Reply with quote

What is static and dynamic linkage
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Fri Jan 13, 2006 10:31 am
Reply with quote

bhuvana_veera wrote:
What is static and dynamic linkage



hai bhuvana_veera


i think you are posting with respect to Static and Dynamic call of a sub routine. Please search in the forum or eloborate your query.



corrections welcomed...


gowtham
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jan 15, 2006 11:13 am
Reply with quote

Here is a quote from "Source Code World":
Quote:
In static linking, the called subroutine is link-edited into the calling program , while in dynamic linking, the subroutine & the main program will exist as separate load modules. You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).

A statically called subroutine will not be in its initial state the next time it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.



O.
Back to top
View user's profile Send private message
bhuvana_veera

New User


Joined: 10 Oct 2005
Posts: 5

PostPosted: Thu Jan 19, 2006 3:31 pm
Reply with quote

hi
thank u for ur info
but i want to know how to change DYNAM to NODYNAM and vice-versa
Back to top
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Thu Jan 19, 2006 3:44 pm
Reply with quote

in static call if you made change to sub program you have to compile both programs but it is not the case with dynamic call in dynamic call if u change sub program no need to compile main program also.
for static call there are one loadmodule for both sub and main prog but for dynam there are separate loadmodules for sub and main program.
and you can change dynam to nodynam at compile time.

regard..
manjinder

correct me if i am wrong.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jan 19, 2006 3:50 pm
Reply with quote

In DYNAM calls to cobol program by default it is NODYNAM only

u can use DYNAM to cause nonnested, separately compiled programs invoked through the CALL literal statement to be loaded (for CALL) and deleted (for CANCEL) dynamically at run time.

CALL identifier statements always result in a run-time load of the target program and are not impacted by this option.

The DYNAM compiler option must not be used by programs that are translated by the CICS translator.

If your COBOL program calls programs that have been linked as dynamic link
libraries (DLLs), then you must not use the DYNAM option. You must instead
compile the program with the NODYNAM and DLL options.

Declared as: DYN|NODYN
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts Dynamic file allocation using JCL JCL & VSAM 8
Search our Forums:

Back to Top