VS COBOL II (1) |
static |
Yes with restrictions (2) |
No |
No |
COBOL/370 (1) |
static |
Yes |
No |
No |
COBOL (5) compiled with NODLL |
static |
Yes |
Yes |
No |
VS COBOL II (1) |
dynamic |
No |
No |
No |
COBOL/370 (1) |
dynamic |
No |
No |
No |
COBOL (5) compiled with NODLL |
dynamic |
Yes (3) |
Yes (3) |
No |
COBOL (6) compiled with DLL |
CALL "literal" to a function within the module |
Yes |
Yes |
No |
COBOL (6) compiled with DLL |
CALL "literal" to a function exported from
a DLL |
Yes (4) |
Yes (4) |
No |
COBOL (6) compiled with DLL |
CALL identifier to a function
exported from a DLL |
Yes (4) |
Yes (4) |
No |
Note: - When the caller is VS COBOL II or COBOL/370, all calls must be
to void functions.
- Static calls are supported from VS COBOL II to C++ with extern
"COBOL" in the following cases:
- The call is done in the main load module.
- The call is done in a load module whose entry point is a Language Environment-conforming program
or routine that was called using COBOL dynamic call.
- The call is done in a module that was called using fetch.
- The call is done in a DLL that was called using DLL linkage.
- Dynamically called load modules cannot contain any DLL routines
that export functions or variables. Use the binder DYNAM(NO) control
statement to prevent marking the load module as a DLL.
The XL C/C++
compiler may mark certain internal symbols as exported, resulting
in the C++ executable being a DLL. To prevent the XL C++ compiler
from doing this, use the NOEXPORT(NOSYS) compiler option.
- In this case, the C++ code can also be compiled with the XPLINK
option. The XPLINK C++ code must reside in a separate module from
the COBOL caller.
- COBOL for MVS™ & VM, COBOL
for OS/390® & VM, or Enterprise COBOL for z/OS
- COBOL for OS/390 &
VM or Enterprise COBOL for z/OS
|