Using CALL identifier with DLLs
In a COBOL program that has been compiled with the DLL
option,
you can use CALL
identifier and CALL
literal statements
to make calls to DLLs. However, there are a few additional considerations
for the CALL
identifier case.
For the content of the identifier or for the literal, use the name of either of the following programs:
- A nested program in the same compilation
unit that is eligible
to be called from the program that contains the
CALL
identifier statement. - A program in a separately bound DLL module. The target program-name must be exported from the DLL, and the DLL module name must match the exported name of the target program.
In the nonnested
case, the runtime environment interprets
the program-name in the identifier according to
the setting of the PGMNAME
compiler option of the
program that contains the CALL
statement, and interprets
the program-name that is exported from the target DLL according to
the setting of the PGMNAME
option used when the target
program was compiled.
The search for the target DLL in the z/OS® UNIX file system is case sensitive. If the
target DLL is a PDSE
member, the DLL member
name must be eight characters or less. For the purpose of the search
for the DLL as a
PDSE
member, the run time automatically
converts the name to uppercase.
If the runtime environment
cannot resolve the CALL
statement in either of these
cases, control is transferred to the ON EXCEPTION
or ON
OVERFLOW
phrase of the CALL
statement. If
the CALL
statement does not specify one of these
phrases in this situation, Language Environment® raises
a severity-3 condition.
Using DLL linkage and dynamic calls together
Compiling programs to create DLLs
Linking DLLs
DLL
PGMNAME
CALL statement (Enterprise COBOL for z/OS Language Reference)
Search order for DLLs in the z/OS UNIX file system