hi,
this is naren.
i hav one cobol program from this i want to call two sub programs a & b
one dynamically and other static canu pls tell me how can i do this
Static and dynamic CALL statements can both be specified in the same program. In the Static CALL the subprogram invoked being link-edited with the main program into one load module. The Dynamic CALL statement results in the dynamic invocation of a separate load module.
When a dynamic CALL statement and a static CALL statement to the same
subprogram are issued within one program, a second copy of the subprogram is loaded into storage. Because this doesn't guarantee that the subprogram will be left in its last-used state, results may be unpredictable.
it all depends upon the compiler option i guess..if you won't give any compiler option then all call will be dynamic whichever you use.Where as you can specify the static call while compiling the program. SYSLMOD contains the load module of a program. so while compiling you program if you provide the object module of both the program and then link it then it will be a static call otherwise if you link independently the load module of the called program is taken at run time then it will be dynamic call.