View previous topic :: View next topic
|
Author |
Message |
debasish_barik
New User
Joined: 24 Jun 2006 Posts: 4
|
|
|
|
Can anyone explain me in a bit detail - the difference between static call and dynamic call. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
uma rao Currently Banned New User
Joined: 20 Oct 2007 Posts: 8 Location: delhi
|
|
|
|
hi, the difference between static call and dynamic call is : if you changed the subprogram you need to compile both main program and subprogram when it comes to dynamic call you need not compile both . you can compile only subprogram wher you had made changes. |
|
Back to top |
|
|
sindhuvava Currently Banned New User
Joined: 05 Dec 2006 Posts: 17 Location: Chennai
|
|
|
|
This may help u:
STATIC Call:
1) Identified by Call literal.
Ex: CALL ‘PGM1’.
2) Default Compiler option is NODYNAM and so all the literal calls are considered as static calls
3) If the subprogram undergoes change, sub program and main program need to be recompiled
4) Sub modules are link edited with main module.
5) Size of load module will be large
6) Fast,Less flexible.
7) Sub-program will not be in initial stage the next time it is called unless you explicitly use INITIAL or you do a CANCEL after each call.
DYNAMIC CALL
1) Identified by Call variable and the variable should be populated at run time.
01 WS-PGM PIC X(08).
Move ‘PGM1’ to WS-PGM
CALL WS-PGM
2) If you want convert the literal calls into DYNAMIC, the program should be compiled with DYNAM option.
By default, call variables and any un-resolved calls are considered as dynamic
3) If the subprogram undergoes change, recompilation of subprogram is enough.
4) Sub modules are picked up during run time from the load library.
5) Size of load module will be less.
6) Slow compared to Static call.
More flexible.
7) Program will be in initial state every time it is called. |
|
Back to top |
|
|
|