OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Recovering From Errors
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
6-3
Using the GPI_STATUS_ Procedure
Using the GPI_STATUS_ Procedure
The GPI_STATUS_ procedure is used to diagnose a failed GPI procedure call.
GPI_STATUS_ has several output parameters that return diagnostic codes. In addition,
for certain errors, GPI_STATUS_ writes additional information to an information buffer.
You can inspect the buffer programmatically, as described later in this section.
Parameters for GPI_STATUS_ are
status-context (input; optional)
session (output; optional)
request-type (output; optional)
old-status (output; optional)
error-class (output; optional)
primary-code (output; optional)
secondary-code (output; optional)
error-qualifier (output; optional)
error-source (output; optional)
info-buffer (output; optional)
info-buffer-length (input; optional)
actual-info-length (output; optional)
total-info-length (output; optional)
status-context specifies whether you want error information tied to a particular
session, any session (ZGPI-ANY), or no session at all.
session returns the identifier of the session to which the status information applies.
request-type returns the request type for the most recent GPI error in the specified
context. The request type identifies the GPI procedure that failed. The values of request
type and the procedures they identify are listed in the GPI Reference Manual.
old-status returns the original status code returned for the most recent GPI error in
the specified context. Typically, this is the status that caused you to call
GPI_STATUS_.
error-class indicates the severity of the problem and suggests a possible recovery.
primary-code returns an XAPIA-standard or Compaq-proprietary code that helps
isolate the cause of the problem.
secondary-code returns information that supplements the primary code.
error-qualifier isolates the failure to the low-level function indicated by
error-source.
Note. Compaq recommends that you specify ZGPI_ANY for session-context, and that
you call GPI_STATUS_ immediately following the warning or error. If GPI_STATUS_ is not
called immediately, current diagnostic information might be overwritten by that of a subsequent
GPI failure.