OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Recovering From Errors
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
6-4
Using the GPI_STATUS_ Procedure
error-source indicates what low-level function within a GPI procedure failed.
info-buffer is the name of the buffer to which you want additional error
information returned. You must include this parameter if you specify a value greater
than 0 for info-buffer-length. If you specify 0 for info-buffer-length,
the buffer remains unchanged.
info-buffer-length specifies the length (in octets) of the buffer specified by
info-buffer. This parameter is required if you specify info-buffer.
actual-info-length indicates the number of octets of information returned to
info-buffer. If no information is returned, the value is 0.
total-info-length returns the total number of octets of information available.
The information buffer, primary-code, secondary-code, and error-class
are described in more detail later in this section.
Figure 6-2 shows the algorithm for a typical GPI diagnostic routine. The diagnostic
routine reports GPI_STATUS_ output parameters and tests the information buffer for
contents. If the buffer has data, the algorithm branches to a separate routine that reports
this data. The “Report info buffer” box is expanded later in this section to show that
part of the algorithm in detail.
The following TAL example is an implementation of the algorithm shown in Figure 6-2.
The show_gpi_status procedure displays status information at the user terminal. If the
Note. error-qualifier and error-source are provided for use by Compaq service
representatives.
Figure 6-2. Flow Diagram for GPI Diagnostics
602CDT .CDD
True
False
> 0 ?
total_info_length
End
Report
info buffer
Report
GPI_STATUS_
parameters