OPM and ILE API differences

This topic gives an overview of how Original Program Model (OPM) APIs and Integrated Language Environment® (ILE) APIs differ from each other. The ILE APIs include the UNIX-type APIs and the ILE CEE APIs, among others.

You must have the ILE language compiler on your system to develop applications that use any ILE APIs.

Comparison of OPM and ILE APIs

OPM APIs ILE APIs
API Name Maximum number of characters: 8 Not case-sensitive Maximum number of characters: 30 Case-sensitive
Required Parameters 1 Displayed in parameter box Displayed in parameter box
Optional Parameters Can include optional parameters. The optional parameters form a group, and you must either include or exclude the entire group. No optional parameters
Omitted Parameters No omitted parameters Can include omitted parameters. When these parameters are omitted, you must pass a null pointer.
Error Conditions 2 The error code parameter is common to most of the OPM APIs, and it is used to return error codes and exception data to the application. The errors that are returned for a given API are in the form of an error message and include the 7-character message identifier. The ILE CEE APIs use feedback codes and conditions
Pointers Can be used, but are used less frequently than the ILE APIs. Due to the greater availability of pointer support in ILE languages, there is a much greater use of pointers in ILE APIs. The use of pointers can provide a performance advantage.
Notes:
  1. UNIX-type APIs include parameters in a Syntax box.
  2. Error conditions
    • The UNIX-type APIs use errnos and return values.
    • The national language data conversion APIs use errnos and return values.
    • The Dynamic Screen Manager (DSM) supports returned values in addition to the error code parameter.

    The errnos are provided as include files in the QSYSINC library.

Following are examples of an OPM API and an ILE API that do similar functions (log or report software errors). The ILE API example makes use of pointers, whereas the OPM API does not. Both programs log software errors by using first-failure data capture (FFDC).

Related concepts
API parameters