OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Recovering From Errors
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
6-2
Using the Status Parameter
The specific error code returned depends on:
•
The GPI procedure that failed
•
The type of failure 
For a complete listing of all GPI status codes, refer to the GPI Reference Manual.
The typical practice is to call GPI_STATUS_ immediately after an error code is returned 
in the status parameter. You might also choose to call GPI_STATUS_ if a warning 
code is returned. The flow diagram in Figure 6-1 illustrates this simple error-checking 
algorithm.
The following TAL example also illustrates the algorithm. In this case, GPI_STATUS_ 
is called immediately after a warning or error code is returned by status. The 
GPI_STATUS_ procedure is contained in a routine called show_gpi_status. The 
complete listing for show_gpi_status is provided later in this section.
status := GPI_MT_FINISH_TRANSFER_IN_ ( session,
 inbound_object,
 OM_FALSE, 
 OM_FALSE, 
 MH_REMOVE); 
IF ( status <> OM_RC_SUCCESS ) THEN
 BEGIN
 -- A warning or error is indicated; find the cause
 CALL show_gpi_status (ZGPI_ANY);
 END;
Note. Within XAPIA specifications, the literal for warning is OM-RC-TEMPORARY-ERROR. 
For clarity, the GPI uses the more explicit ZGPI-RC-WARNING.
Figure 6-1. Flow Diagram for GPI Error-Checking
601CDT .CDD
True
If information about 
warning is desired
False
(error)
status =
success or
warning?
Call GPI
procedure
Continue
processing
Call
Call
GPI_STATUS_










