Before you attempt to build complex DLLs it is important to understand the differences between the terms DLL, DLL code, and DLL application, as described in DLL concepts and terms.
Note that not all source files that make up a DLL application have to be compiled with the DLL option. However, source files that reference exported functions and exported global variables must be compiled with the DLL option.
A key characteristic of a complex DLL or DLL application is that linking DLL code with non-DLL code creates it. The following are reasons you might compile your code as non-DLL:
For more information on building complex DLLs, see z/OS XL C/C++ Programming Guide.