OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-34
Retrieving Information From a Root Object
Fetching String Values of Single-Valued Attributes
The elements of an attribute value that has a syntax of OM-S-xxx-STRING are returned 
in the string buffer you specify. The starting address of each value is returned in the 
OM-S-string elements field of the descriptor value field for that attribute. For details on 
descriptor fields, refer to the GPI Reference Manual.
If a string is a long string (the total length of the string is greater than the maximum-
string-length value specified for the GPI_INITIALIZE_ procedure) or if a string 
does not fit in the buffer, GPI_OM_FETCH_ does the following:
•
Returns the length of the value in the string-length field of the descriptor value field 
for the attribute 
•
Returns OM-ELEMENTS-UNSPECIFIED in the string-elements field
If you detect either of these situations, you can retrieve the string by making another 
procedure call.  To retrieve a long string, call the GPI_OM_READ_ procedure.  To 
retrieve other strings, call GPI_OM_FETCH_ again and specify a larger buffer 
(string-buffer-length).
If an attribute following one for which a value is not returned has a shorter string value 
that fits in the buffer, that value is returned.  You should continue examining the 
descriptor list after detecting OM-ELEMENTS-UNSPECIFIED to check the remaining 
contents of the string buffer.










