ILE COBOL Programmer's Guide

Calling OPM COBOL/400 Programs

OPM COBOL/400 programs can only be run in the Default Activation Group (*DFTACTGRP). ILE COBOL programs can be run in the Default Activation Group (*DFTACTGRP), in *NEW ILE activation groups, and in named ILE activation groups.

Note:
CRTPGM does not allow *DFTACTGRP to be explicitly specified in the ACTGRP parameter but it does allow *CALLER to be specified in the ACTGRP parameter. Specifying *CALLER in the ACTGRP parameter allows an ILE COBOL program called from an OPM COBOL/400 program (or any OPM program) to be run in the Default Activation Group. This is the only way for an ILE COBOL program to run in the Default Activation Group. An ILE COBOL program cannot be the hard control boundary in the Default Activation Group.

When a mixed language application of OPM COBOL/400 and ILE COBOL programs is run, the following scenario must be adhered to in order to most closely mimic an OPM COBOL/400 run unit:

For a mixed language application of OPM COBOL/400 and ILE COBOL programs running in the Default Activation Group, each ILE COBOL program is considered to be a non-COBOL program by the OPM COBOL/400 programs and each OPM COBOL/400 program is considered to be a non-COBOL program by the ILE COBOL programs. Also, each ILE COBOL program that is called by an OPM COBOL/400 program generates a soft control boundary by which the scope of the STOP RUN issued by the ILE COBOL program is bound.

When STOP RUN is issued by the ILE COBOL program, control is returned to the OPM COBOL/400 program without refreshing the state of the ILE COBOL program and the OPM COBOL/400 run unit is not ended. When STOP RUN is issued from an OPM COBOL/400 program, control is returned to the caller of the current main OPM COBOL/400 program and the OPM COBOL/400 run unit is ended.

For a mixed language application of OPM COBOL/400 and ILE COBOL programs where an ILE COBOL program is running in a *NEW or named ILE activation group and the OPM COBOL/400 program is running in the Default Activation Group, the effect of STOP RUN issued by the ILE COBOL program depends on whether the nearest control boundary is a hard control boundary or a soft control boundary. If it is a hard control boundary then control is returned to the caller of the hard control boundary and its *NEW or named ILE activation group is ended. If it is a soft control boundary then control is returned to the caller of the soft control boundary but the *NEW or named ILE activation group of the ILE COBOL program remains active.

Note:
This scenario does not conform to an OPM COBOL/400 run unit.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]