ILE COBOL Programmer's Guide

Run Time

Run Time

Preserving the OPM-compatible Run Unit Semantics

You can closely preserve OPM-compatible run unit semantics in:

Preserving OPM-compatible Run Unit Semantics in an ILE COBOL Application

To preserve the OPM-compatible run unit semantics in an ILE COBOL application, the following conditions must be met:

If these conditions are not met, an implicit or explicit STOP RUN in an ILE activation group may not end the activation group. With the activation group still active, the various ILE COBOL programs will be in their last used state.

Note:
The above condition dictates that an ILE COBOL program running in the *DFTACTGRP is generally run in a run unit that is not OPM-compatible. ILE COBOL programs running in the *DFTACTGRP will not have their static storage physically reclaimed until the job ends. An ILE COBOL program, with *CALLER specified for the ACTGRP parameter of the CRTPGM command, will run in the *DFTACTGRP if it is called by an OPM program.

Preserving OPM-compatible Run Unit Semantics in a Mixed OPM COBOL/400 and ILE COBOL Application

In order to mix OPM COBOL/400 programs with ILE COBOL programs and still preserve the OPM-compatible run unit semantics as closely as possible, the following conditions need to be met:

If the above conditions are not met, the OPM-compatible run unit semantics is not preserved for OPM/ILE mixed application. For example, if an ILE COBOL program is running in the *DFTACTGRP and it issues a STOP RUN, both the OPM COBOL/400 and ILE COBOL programs will be left in their last used state.

In ILE COBOL, the flow of control operations, CALL, CANCEL, EXIT PROGRAM, STOP RUN, and GOBACK, will cause the run unit to behave differently unless an OPM-compatible run unit is used.

Error Messages

In ILE COBOL, runtime error messages are prefixed with LNR. Also, some of the message numbers are not always the same as in OPM COBOL/400.

In ILE COBOL, when the run unit terminates abnormally, the message CEE9901 is returned to the caller. In OPM COBOL/400, the message LBE9001 is returned to the caller under the same circumstances.

Due to differences between ILE exception handling and OPM exception handling, you may receive more exceptions in an ILE COBOL statement compared to an OPM COBOL/400 statement.

File Status 9A changed to 0A

In OPM COBOL/400, file status is set to 9A when a job is ended in a controlled manner.

In ILE COBOL, file status is set to 0A when a job is ended in a controlled manner.

File Status 9M changed to 0M

In OPM COBOL/400, file status is set to 9M when the last record is written to a subfile.

In ILE COBOL, file status is set to 0M when the last record is written to a subfile.


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