Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Using DLL linkage and dynamic calls together

For applications (that is, Language Environment enclaves) that are structured as multiple, separately bound modules, you should use exclusively one form of linkage between modules: either dynamic call linkage or DLL linkage.

DLL linkage refers to a call in a program that is compiled with the DLL and NODYNAM options in which the call resolves to an exported name in a separate module. DLL linkage can also refer to an invocation of a method that is defined in a separate module.

However, some applications require more flexibility. If so, you can use both DLL linkage and COBOL dynamic call linkage within a Language Environment enclave if the programs are compiled as follows:

Program A Program B Compile both with:
Contains dynamic call Target of dynamic call NODLL
Uses DLL linkage Contains target program or method DLL

If a program contains a CALL statement for a separately compiled program and you compile one program with the DLL compiler option and the other program with NODLL, then the call is supported only if you bind the two programs together in the same module.

The following diagram shows several separately bound modules that mix dynamic calls and DLL linkage.

Dynamic calls and DLL linkage used together. Link to detail.

All components of a DLL application must have the same AMODE. The automatic AMODE switching normally provided by COBOL dynamic calls is not available for DLL linkages.

You cannot cancel programs that are called using DLL linkage.

related concepts  
Dynamic link libraries (DLLs)

related references  
DLL  
EXPORTALL


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)