Compiling programs to create DLLs

When you compile a COBOL program with the DLL option, it becomes enabled for DLL support. Applications that use DLL support must be reentrant. Therefore, you must compile them with the RENT compiler option and link them with the RENT binder option.

In an application with DLL support, use the following compiler options depending on where the programs or classes are:

Table 1. Compiler options for DLL applications
Programs or classes in: Compile with:
Root program object DLL, RENT, NOEXPORTALL
DLL program objects used by other program objects DLL, RENT, EXPORTALL

If a DLL program object includes some programs that are used only from within the DLL module, you can hide these routines by compiling them with NOEXPORTALL.

Example: sample JCL for a procedural DLL application

related references  
DLL  
EXPORTALL  
RENT