Declaring COBOL to PL/I ILC

If a PL/I routine invokes a COBOL program or a COBOL program invokes a PL/I routine, you must specify entry declarations in the PL/I source code. No special declaration is required within the COBOL program.

When invoking a COBOL program from PL/I, you identify the COBOL entry point by using the OPTIONS attribute in the declaration of the entry in the calling PL/I routine. By specifying OPTIONS(COBOL) when calling a COBOL program, you request that the PL/I compiler generate a parameter list for the COBOL program in the style COBOL accepts.

In a PL/I routine that calls a COBOL program, the declaration of the COBOL entry point looks like the following:
DCL COBOLEP ENTRY OPTIONS(COBOL);
The entry points in a PL/I routine invoked from a COBOL program must be identified by the appropriate options in the corresponding PL/I PROCEDURE or ENTRY statement, as illustrated here:
PLIEP: PROCEDURE (parms) OPTIONS(COBOL);

parms specifies parameters that are passed from the calling COBOL program. OPTIONS(COBOL) specifies that the entry point can be invoked only by a COBOL program.

For more information about the COBOL option, see the IBM Enterprise PL/I for z/OS library.

In addition to the COBOL option, other options suppress remapping of data aggregates. These are described in Using aggregates.

Only data types common to both languages can be passed or received.