View previous topic :: View next topic
|
Author |
Message |
sureshreddypalukuru
New User
Joined: 23 May 2008 Posts: 1 Location: Hyd
|
|
|
|
just I want differenc b/w mainprogarm and sub program
at same time dynamic call and static call |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
sureshreddypalukuru wrote: |
just I want differenc b/w mainprogarm and sub program
at same time dynamic call and static call |
Hi Suresh,
Subprogram usually will have a specific logic which can be used at many places i mean which can be called by many programs.
Means if u have the specific logic used at many places then it will be coded in Subprogram.
For ur second one
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
How much expensive is Dynamic calls?
If I have a choice to make it static or dynamic what should be my choice?
If storage is of main concern, then we can go for "Dynamic call" as module will be loaded to main memory only when it is called/needed.
If speed is of main concern, then we can go for "Static Call" as all modules will be link-edited together into the calling module during compilation process only.
The dynamic and static calling depends on Compiler options only.
U can check a program is calling other pgm dynamically/ statically by looking at the load module.
Suppose program XYZ is calling ABC , then the load module of XYZ in case of dynamic calling will not have any other load module.
If XYZ has a static call to ABC , in that case load module of XYZ will be having load module of ABC also attached to it. If XYZ is calling more then one programs static way , then u will find all those load modules attached in the load module of XYZ.
In case of static calling , first u will have to compile the called programs and then compile the main program. |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
Dont u think this has the answers in the manuals? |
|
Back to top |
|
|
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 103 Location: INDIA
|
|
|
|
Even these are availables in any FAQs of COBOL. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
the_gautam wrote: |
Dont u think this has the answers in the manuals? |
Yes ofcourse...As i have info which i got from this forum i have shared the same. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
gautam,
Quote: |
Dont u think this has the answers in the manuals? |
Yes, but it doesn't stop anyone from answering. |
|
Back to top |
|
|
|