I don't know anything about COBOL's use of dynamic call, but all z/OS "callable 
services" (where a "callable service" is not the same as any service that can 
be invoked with a branch instruction) have a "stub" that you can link with your 
program and use to resolve the external reference of the "call" to the target.

Many callable services do document a protocol of loading the stub and then 
following a "pointer chain" to get to the address of the routine in order to do 
the call (specifically to avoid problems that could arise with having to link 
the stub with your executable). That is, approximately, what Tony H's code 
snippet does, although his specific approach is not supported by IBM unless it 
is documented.

Some "pointer chain" approaches (as Tony H's appears to be) might bypass the 
stub entirely in which case the invoker bears the responsibility of ensuring 
the proper environment (that the stub itself might have enforced).

Peter Relson

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to