Error code parameter

An API error code parameter is a variable-length structure that is common to all of the system APIs.

The error code parameter controls how errors are returned to the application. The parameter must be initialized before the program calls the API. Depending on how the error code structure is set, this parameter either returns information associated with an error condition or causes errors to be returned as exception messages.

For some APIs, the error code parameter is optional. If you do not code the optional error code parameter, the API returns diagnostic and escape messages. If you code the optional error code parameter, the API can either signal exceptions or return the exception information in the error code parameter.

Notes:
  1. The ILE CEE APIs use feedback codes and conditions.
  2. The UNIX®-type APIs and the National Language Data Conversion APIs use errno to report error conditions.

The error code structure is provided in the QSYSINC library and is called QUSEC.

Related concepts
Include files and the QSYSINC library
Related reference
i5/OS Messages and the ILE CEE API Feedback Code