by BillyBoyo » Tue Apr 05, 2011 3:08 am
Look at it this way if it helps.
For a static call, the linkage-editor provides the address of the called program to the calling program. So a static call is only possible if the module to be called is known at compile time.
A dynamic call only gets an address for the called program at run time.
If you use "call data-name", it is not known at compile time (even if the data-name is a psudo literal, ie it is not changed in the program) what name might actually be called.
So only "call literal" (known value at compile time) can be static. By default, it is static, so if you want it dynamic (for all calls in the main program) you have to compile with the DYNAM option. If you have one module you want dynamic and others static, change the one module to "call data-name" with a value clause on the data-name.
"Call data-name" can only be dynamic. If you want it to be static, you have to change it to "call literal". If you were selecting which module to call by setting the value of the data-name, you have to use different selection logic to a number of "call literal" statements.