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 DLL 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 DLL 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. When 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 (.EXE or .DLL files) in an application must not statically call the same nonnested subprogram.
related concepts
Static linking and dynamic linking
related tasks
Calling nonnested COBOL programs
Creating DLLs
related references
DYNAM
CALL statement
(COBOL for Windows Language Reference)