OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-13
Closing a Session
gateway_password_length := 7, -- Length of gateway password
mhs_mgr_name_length := 4; -- Length of mhs_mgr_name
INT(32)
environment_object; -- Local environment object id
STRING
gateway_name[0:31] := ["Gateway "],
gateway_instance_name[0:31]
:= ["Instance "],
mhs_mgr_name[0:3] := ["$ZG1"],
gateway_password[0:6] := ["GATEWAY"];
Procedure call:
status := GPI_OPEN_ ( gateway_name,
gateway_instance_name,
session,
environment_object,
mhs_mgr_name,
mhs_mgr_name_length,
gateway_password,
gateway_password_length);
Closing a Session
You call the GPI_CLOSE_ procedure to close a GPI session. GPI_CLOSE_ has only
one parameter: the identifier of the session to be closed (input parameter; required).
Following GPI_CLOSE_ , the session identifier is invalid, and all root objects that were
reserved in that session are restored to the unreserved state. For details on reserved and
unreserved root objects, refer to Section 2, The GPI Library
.
The following TAL example shows a call to GPI_CLOSE_ .
Data declarations:
INT
status, -- STATUS code
session; -- Session identifier
Procedure call:
status := GPI_CLOSE_ (session);
Retrieving Error Information
You call the GPI_STATUS_ procedure to retrieve diagnostic information about a failed
GPI procedure call. Information returned by GPI_STATUS_ supplements the
information returned by the status parameter of each GPI procedure call. Typically,
you call GPI_STATUS_ immediately after an error code is returned by the status
parameter. You can also choose to call GPI_STATUS_ if a warning code is returned.
Note. GPI_STATUS_ requires data structures that are set up by successful execution of
GPI_INITIALIZE_ . GPI_STATUS_ cannot be used to diagnose a failed call to
GPI_INITIALIZE_ .