Calling to or from COBOL programs
You can make calls to or from VS COBOL II, COBOL for MVS™ & VM, COBOL for OS/390® & VM, and Enterprise COBOL programs by using the
you are calling a separately compiled COBOL program that was processed
with either the separate CICS® translator
or the integrated CICS translator,
you must pass
the first two parameters in the
Called programs that are processed by the separate CICS translator or the integrated CICS translator can contain any function that is supported by CICS for the language.
You can use COBOL dynamic calls when
running under CICS. If a COBOL
EXEC CICS statements or
EXEC SQL statements, the
option is required. To dynamically call a program in this case, you
CALL identifier with the
If a COBOL program contains
EXEC CICS statements and contains no
SQL statements, there is no requirement to compile with
To dynamically call a program in this case, you can use either
CALL literal with
DYNAM compiler option, or
END-EXEC cannot be followed by a period
when it is associated with
EXEC CICS statements even
though it is required for
EXEC SQL statements.
You must define
dynamically called programs in the CICS program
processing table (PPT) if you are not using CICS autoinstall. Under CICS, COBOL programs do not support dynamic
calls to subprograms that have the
coded in their CICS
Dynamic calls to programs that are defined with
cause a storage shortage. Use the
for programs that are to be dynamically called by COBOL.
Interlanguage communication (ILC):
Support for ILC with other
high-level languages is available. Where ILC is not supported, you
The following table shows the calling relationship between COBOL and assembler programs. In the table, assembler programs that conform to the interface that is described in the Language Environment Programming Guide are called Language Environment®-conforming assembler programs. Those that do not conform to the interface are non-Language Environment-conforming assembler programs.
|Calls between COBOL and assembler programs
|Language Environment-conforming assembler program
|Non-Language Environment-conforming assembler program
|From an Enterprise COBOL program to the assembler program?
|From the assembler program to an Enterprise COBOL program?
you compile with the integrated CICS translator,
the translator generates the
blocks with the
GLOBAL clause in the outermost program.
Therefore if you code nested programs, you do not have to pass these
control blocks as arguments on calls to the nested programs.
you code nested programs and you plan to use the separate CICS translator, pass
parameters to the nested programs that contain
or references to the
EXEC interface block (
You must pass the same parameters also to any program that forms part
of the control hierarchy between such a program and its top-level
For detailed information and examples on calling COBOL programs under CICS, see Calling subprograms from COBOL programs in Developing CICS Applications.
Integrated CICS translator
Using the separate CICS translator
Choosing the DYNAM or NODYNAM compiler option
Handling errors when calling programs
ILC under CICS (Language Environment Writing Interlanguage Communication Applications)
The external CICS interface (CICS Transaction Server for z/OS® External Interfaces Guide)