1.In this case if you use CALL PROGB USING A,B,C; It is call static call
if you move sub prog name to some WS variable and
CALL WS-VAR USING A,B,C---It is called Dynatmic.
2. in static call if you made any changes in sub program you have to compile all the programs. but in Dynamic call need to compile only the changed programs.
3.in static call all the sub modules are link edited with main load module
where as in Dynamic call created different loadmodules.
I dont think calling a Sub program with some WS variable is a Dynamic call.
some additional info.
1) If the subprogram undergoes change. Recompile of sub program is enough
2) Sub routine picked during run time form load library
3) Program will be in the initial state every time.
4) Size of load module will be less.
1) If the subprogram undergoes change. Recompile of sub program & main program is required
2) Sub module link edited with main module
3) Program won’t be in the initial state.
4) Size of the load module will be more
Note, too, that in a STATIC call environment, if you change and re-compile a sub-program it is really not necessary to re-COMPILE the MAIN program, it is only necessary to re-LINK ( re-bind ) the main program - to replace the (obsolete) sub-program in the statically-linked executable.
Additionally, in a DYNAMIC call environment, a sub-program will not necessarily be in its initial state on every call unless a) a CANCEL statement has been issued prior to each CALL, or b) the sub-program has been compiled with the INITIAL attribute. In fact, there is no guarantee that the sub-program will be in its initial state even on the first call, if the sub-program was compiled with the RECURSIVE attribute, since there could be a "used" copy of the module in-core at the time of the call.