Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


CALL statements on CICS

With Enterprise COBOL, you can use static and dynamic CALL statements to call VS COBOL II, IBM COBOL, Enterprise COBOL, assembler, C, and PL/I programs. However, Language Environment does not support static or dynamic CALL statements between Enterprise COBOL programs and OS/VS COBOL programs (Continue to access OS/VS COBOL subroutines by EXEC CICS LINK).
General considerations
If your Enterprise COBOL program was processed by a CICS translator (either separate or integrated), then a caller of that program must pass the CICS EXEC interface block (DFHEIBLK) and the communication area (DFHCOMMAREA) as the first two parameters of the CALL statement. If your Enterprise COBOL program was not processed by a CICS translator, then you need to pass DFHEIBLK and DFHCOMMAREA only if they are explicitly coded in the called subprogram.

The CICS command translation process automatically inserts these parameters as the first two parameters on the corresponding PROCEDURE DIVISION USING statement in the subprogram.

Static CALL statements
In Enterprise COBOL, you can use the COBOL CALL statement to statically call VS COBOL II, IBM COBOL, and Enterprise COBOL, and assembler programs. For details of when static CALL statements are supported, see Table 1. In addition, Language Environment supports ILC between PL/I and COBOL and between C and COBOL when running on CICS. For details, see the Language Environment Writing Interlanguage Applications.

In OS/VS COBOL, if multiple COBOL programs are separately compiled and then link-edited together, only the first program can contain CICS statements. With Enterprise COBOL, this restriction is removed, giving you greater flexibility in application program design.

Dynamic CALL statements
In Enterprise COBOL, you can use the COBOL CALL statement to dynamically call VS COBOL II, IBM COBOL, and Enterprise COBOL, and assembler programs. For details of when dynamic CALL statements are supported, see Table 1. For example, programs that are the targets of dynamic CALL statements can contain CICS statements. In addition, Language Environment supports ILC between PL/I and COBOL and between C and COBOL when running on CICS. For details, see the Language Environment Writing Interlanguage Applications.

For Enterprise COBOL programs running under CICS, the ON EXCEPTION/OVERFLOW clause of the CALL statement is enabled.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)