Joined: 22 Aug 2005 Posts: 413 Location: Colarado, US
Below listed are the differences between Static and Dynamic Call.
Check out the answers.
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
8)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.
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
2)If you want convert the literal calls into DYNAMIC, the program should be compiled with DYNAM option.
3)By default, call variables and any un-resolved calls are considered as dynamic.
4)If the subprogram undergoes change, recompilation of subprogram is enough.
5)Sub modules are picked up during run time from the load library.
6)Size of load module will be less.
7)Slow compared to Static call.
9)Program will be in initial state every time it is called.
Can any one tell me what is the difference between Static and Dynamic call with example? Please elaborate in simple terms.
in static call calling prog and called prog are physically linked together. u cannot delete one.u have to submit prog again for compilation
in dynamic call calling prog and called prog are not physically linked together. There are 2 seperate load module .if one can be deleted no problem is there u can only compile one prog linke edit it and sub it