IBM® i Messages and the Bindable API Feedback Code

As input to a bindable API, you have the option of coding a feedback code, and using the feedback code as a return (or feedback) code check in a procedure. The feedback code is a condition token value that is provided for flexibility in checking returns from calls to other procedures. You can then use the feedback code as input to a condition token. If the feedback code is omitted on the call to a bindable API and a condition occurs, an exception message is sent to the caller of the bindable API.

If you code the feedback code parameter in your application to receive feedback information from a bindable API, the following sequence of events occurs when a condition is raised:
  1. An informational message is sent to the caller of the API, communicating the message associated with the condition.
  2. The bindable API in which the condition occurred builds a condition token for the condition. The bindable API places information into the instance specific information area. The instance specific information of the condition token is the message reference key of the informational message. This is used by the system to react to the condition.
  3. If a detected condition is critical (severity is 4), the system sends an exception message to the caller of the bindable API.
  4. If a detected condition is not critical (severity less than 4), the condition token is returned to the routine that called the bindable API.
  5. When the condition token is returned to your application, you have the following options:
    • Ignore it and continue processing.
    • Signal the condition using the Signal a Condition (CEESGL) bindable API.
    • Get, format, and dispatch the message for display using the Get, Format, and Dispatch a Message (CEEMSG) bindable API.
    • Store the message in a storage area using the Get a Message (CEEMGET) bindable API.
    • Use the Dispatch a Message (CEEMOUT) bindable API to dispatch a user-defined message to a destination that you specify.
    • When the caller of the API regains control, the informational message is removed and does not appear in the job log.

If you omit the feedback code parameter when you are calling a bindable API, the bindable API sends an exception message to the caller of the bindable API.