OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-44
Retrieving Information From a Root Object
After the call, the descriptor list is returned with the values 1, 2, and 3 of attribute
type C. As shown in this example, these values contain a total of “xx” octets of short
string data, which is placed in string-buffer. If the values had contained long
strings, you would need to use the GPI_OM_READ_ procedure to read them.
Example: Inspecting Values of a Multivalued Attribute
The following TAL example shows a call to GPI_OM_LIST_ . The call returns all
values of the MH-T-RECIPIENT-DESCRIPTORS attribute.
literal STRING_BUFFER_LEN = 100;
literal MAX_DESCRIPTORS = 20;
Data declarations:
INT
status, -- STATUS code
attribute_type := MH_T_RECIPIENT_DESCRIPTORS;
INT(32)
object_id, -- ID of object that contains
-- attribute to be listed
value_position := 0D, -- Position of first value to
-- be returned
maximum_number, -- Maximum number of descrip-
-- tors to be returned
total_number, -- Total number of values
-- present in the attribute
actual_number, -- Number of descriptors
-- returned
string_buffer_length := STRING_BUFFER_LEN,
actual_string_length, -- Number of octets returned
total_string_length; -- Number of octets available
STRING
.EXT string_buffer[0:STRING_BUFFER_LEN]; -- Buffer for the
-- strings
STRUCT
.EXT descriptor_list(OM_descriptor)[0:MAX_DESCRIPTORS];
Procedure call:
status := GPI_OM_LIST_ (object_id,
attribute_type,
value_position,
maximum_number,
descriptor_list,
total_number,
actual_number,
string_buffer,
string_buffer_length,
actual_string_length,
total_string_length);