CALL identifier and CALL literal

CALL identifier, where identifier is a data item that contains the name of a nonnested subprogram at run time, always results in the target subprogram being loaded when it is called. CALL literal, where literal is the explicit name of a nonnested target subprogram, can be resolved either statically or dynamically.

With CALL identifier, the name of the executable or shared library must match the name of the target entry point.

With CALL literal, if the NODYNAM compiler option is in effect, either static or dynamic linking can be done. If DYNAM is in effect, CALL literal is resolved in the same way as CALL identifier: the target subprogram is loaded when it is called, and the name of the executable must match the name of the target entry point.

These call definitions apply only in the case of a COBOL program calling a nonnested program. If a COBOL program calls a nested program, the call is resolved by the compiler without any system intervention.

Limitation: Two or more separately linked executables in an application must not statically call the same nonnested subprogram.

related concepts  
Static linking versus using shared libraries

related references  
DYNAM  
CALL statement (COBOL for AIX Language Reference)