View previous topic :: View next topic
|
Author |
Message |
Kailash Chandra
New User
Joined: 06 Dec 2005 Posts: 2
|
|
|
|
Can any one tell me what is the difference between Static and Dynamic call with example? Please elaborate in simple terms. |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi Kailash,
Please search our forum. I think it is a repeated one. |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi,
Below listed are the differences between Static and Dynamic Call.
Check out the answers.
STATIC CALL
Quote: |
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
7)Less flexible.
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. |
DYNAMIC CALL
Quote: |
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.
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.
8)More flexible.
9)Program will be in initial state every time it is called. |
Hope this helps. |
|
Back to top |
|
|
friend_prasad
New User
Joined: 06 Jan 2006 Posts: 12
|
|
|
|
Kailash Chandra wrote: |
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
prasad |
|
Back to top |
|
|
friend_prasad
New User
Joined: 06 Jan 2006 Posts: 12
|
|
|
|
are u satisfied |
|
Back to top |
|
|
umeshkmrsh
New User
Joined: 21 Sep 2005 Posts: 79 Location: India
|
|
|
|
Thanks "iknow" for consolidated listing. |
|
Back to top |
|
|
Kailash Chandra
New User
Joined: 06 Dec 2005 Posts: 2
|
|
|
|
Differences are clear. Thanx to both of you, iknow and prasad. |
|
Back to top |
|
|
mainframe_sameer
New User
Joined: 12 Mar 2006 Posts: 2
|
|
|
|
thank 2 u all . it really helps me |
|
Back to top |
|
|
sanath_m
New User
Joined: 10 Mar 2006 Posts: 9
|
|
|
|
Thans a lot....for giving information..... |
|
Back to top |
|
|
|