On Windows platforms, you can execute the cbllink command at an Enterprise Developer command prompt to link a PL/I program to COBOL routines. This can simplify the mix of PL/I and COBOL routines.
First, create a .def file to feed to the cbllink command. The following example depicts a .def file for a program named I111P00. Text that is unique for each program appears in bold:
LIBRARY "I111P00" BASE=0x61000000 EXPORTS systemMVS @1 MFOPENPLIINIT @2 MFOPENPLITERM @3 _mFinfo_I111P00=_mFinfo_I111P00 @4
The first ordinal must be systemMVS for a JCL-based program, systemIMS for an IMS-based program, and systemCICS for a CICS-based program.
Building further on this example, the following commands assume a .def file named MyDef.def in the current directory:
32-bit:
set link=/incremental:no -debug cbllink I111P00.obj "%MFPLI_PRODUCT_DIR%\lib\mfplimd.lib" "%MFPLI_PRODUCT_DIR%\lib\setupdeffiles.obj" "%MFPLI_PRODUCT_DIR%\lib\dllmain.obj" "%MFPLI_PRODUCT_DIR%\lib\lpimainstub.obj" "%MFPLI_PRODUCT_DIR%\lib\systemmvs.obj" MyDef.def -v -RS -D -OI111P00.dll
64-bit:
set link=/incremental:no -debug cbllink I111P00.obj "%MFPLI_PRODUCT_DIR%\lib64\mfplimd.lib" "%MFPLI_PRODUCT_DIR%\lib64\setupdeffiles.obj" "%MFPLI_PRODUCT_DIR%\lib64\dllmain.obj" "%MFPLI_PRODUCT_DIR%\lib64\lpimainstub.obj" "%MFPLI_PRODUCT_DIR%\lib64\systemmvs.obj" MyDef.def -v -RS -D -OI111P00.dll