OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-36
Retrieving Information From a Root Object
Example: Inspecting an Object for Specific Attribute Types
The following TAL example shows a call to GPI_OM_FETCH_ . The call is designed 
to inspect the class attribute of an object to determine its type.
literal MAX_DESCRIPTORS = 20; 
literal STRING_BUFFER_LEN = 100;
Data declarations:
INT
 status; -- STATUS code
INT(32)
 object_id, -- ID of object that contains
 -- attribute to be fetched
 values := OM_TRUE, -- Return syntax and values of
 -- single-valued attributes
 descriptor_count := 1D, -- Number of descriptors in
 -- descriptor_list_in,
 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 any
 -- returned strings
STRUCT
 .EXT descriptor_list_in(OM_descriptor)[0:MAX_DESCRIPTORS];
STRUCT
 .EXT descriptor_list_out(OM_descriptor)[0:MAX_DESCRIPTORS];
 -- Output descriptor list
 -- Initialize input descriptor
descriptor_list_in[0].type := OM_T_CLASS;
Procedure call:
status := GPI_OM_FETCH_ ( object_id,
 values,
 descriptor_list_in,
 descriptor_count,
 descriptor_list_out,
 string_buffer,
 string_buffer_length,
 actual_string_length,
 total_string_length);
Inspecting an Object for All Attribute Types
You call the GPI_OM_EXAMINE_ procedure to dump the types of single-valued and 
multivalued attributes within an object. As an option, you can also dump the syntax and 
values of single-valued attributes that have a value present. You can request the 
descriptors of one or more attributes beginning at a specified attribute position.










