OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-47
Finishing Transfer-in of a Root Object
Example: Reading a Long String From an Attribute Value
The following TAL example shows a call to GPI_OM_READ_ .
literal STRING_BUFFER_LEN = 100;
IGNORED_FOR_SINGLE_VALUED_ATT = 0D;
Data declarations:
INT
status, -- STATUS code
attribute_type := IM_T_TEXT; -- Attribute from which string
-- segment is read
INT(32)
object_id, -- ID of object that contains
-- attribute from which
-- string segment is read
value_position := IGNORED_FOR_SINGLE_VALUED_ATT,
string_offset := 0D, -- Starting point
maximum_number, -- Maximum number of octets to
read
actual_number, -- Number of octets read
approx_total_number; -- Total number of octets
-- available to read
STRING
.EXT data_string[0:STRING_BUFFER_LEN]; -- Buffer for read
Procedure call:
status := GPI_OM_READ_ ( object_id,
attribute_type,
value_position,
string_offset,
maximum_number,
data_string,
actual_number,
approx_total_number);
Finishing Transfer-in of a Root Object
You call the GPI_MT_FINISH_TRANSFER_IN_ procedure after you have successfully
completed the first stage of inbound processing; that is, after you have retrieved
information from the inbound root object using object management inspecting
procedures.
A call to GPI_MT_FINISH_TRANSFER_IN_ completes the inbound transfer. You can
do any of the following with the root object on the input queue (Figure 5-13):
Unreserve the object (cancel the transfer-in – MH-CANCEL)
Delete the object (remove from the input queue – MH-REMOVE)
Archive the object (MH-ARCHIVE)
Transfer the object out for delivery (P1-EXIT only – MH-TRANSFER)