View previous topic :: View next topic
|
Author |
Message |
bhuvana_veera
New User
Joined: 10 Oct 2005 Posts: 5
|
|
|
|
What is static and dynamic linkage |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
bhuvana_veera
New User
Joined: 10 Oct 2005 Posts: 5
|
|
|
|
hi
thank u for ur info
but i want to know how to change DYNAM to NODYNAM and vice-versa |
|
Back to top |
|
|
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
|