OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-39
Retrieving Information From a Root Object
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_EXAMINE_ again and specify a larger buffer
(string-buffer-length) or examine only one attribute by specifying its attribute
position and a maximum-number value of 1.
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.
Figure 5-10 shows use of the GPI_OM_EXAMINE_ procedure. Conditions before the
procedure call are shown to the left of the vertical bracket; those after the call are to the
right.
The value specified for object is OBJECT_X_ID , the identifier of object X. As
specified by attribute-position, the inspection is to begin at the first attribute
contained within object X. OM-TRUE is specified for values, indicating the call
should return syntax and a value for any single-valued attributes examined. maximum-
number is 4, indicating that up to four descriptors are to be returned. string-
buffer-length allocates “xxx” octets for the length of string-buffer.
Figure 5-10. Using GPI_OM_EXAMINE_
510CDT .CDD
Output Parameters
descriptor-list
OM-T-Class
Attribute Type A
OM-S-Integer
OM-S-Object
Object X
Object_Y_ID
Attribute Type C OM-S-Unspecified
actual-string-length: xx octets
total-string-length: xx octets
total-number: 18
actual-number: 4
Attribute Type H Syntax of H Value of H
string-buffer
xxx octets
xx octets
Input Parameters
object: OBJECT_X_ID
string-buffer-len: xxx octets
attribute-position: 0
values: OM-TRUE
maximum-number: 4
OBJECT X (OBJECT_X_ID)
Attribute Type A
OM-S-Object
Object_Y_ID
1
0
OM-T-Class
OM-S-Integer
Object X
OBJECT Y (OBJECT_Y_ID)
Attribute Type F
Syntax of F
Value of F
1
OM-T-Class
OM-S-Integer
Object Y
0
2
Attribute Type C
Syntax of C
Value 0 of C
Value 1 of C
Value 2 of C
Value 3 of C
• • •
18
Attribute Type W
Syntax of W
Value of W
Attribute Type H
Syntax of H
Value of H
3