OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-20
Building a Root Object
can occur, for example, if an attribute was inserted previously or was initialized when
the object was created.
If the syntax of a value is OM-S-OBJECT, the value is the object identifier of the
subobject you are inserting as an attribute.
Inserting Values for Multivalued Attributes
The GPI_OM_INSERT_ procedure inserts values in multivalued attributes, as follows:
If you supply contiguous values for a multivalued attribute, the procedure inserts the
additional values sequentially after the first new value.
If you supply noncontiguous values for the same multivalued attribute,
value-position is used to determine where to place the first new value of each
portion of the non-contiguous list of values. In other words, each portion of the list
is inserted at the same position and causes the positions of values already in the
attribute to be moved to higher-numbered positions.
You should not try to insert values for different types of multivalued attributes, unless
value-position is appropriate for processing each attribute.
If an attribute is new and contains no existing values, the new values are inserted
starting at position 0.
Figure 5-3 shows use of the GPI_OM_INSERT_ procedure. Conditions before the
procedure call are shown to the left of the vertical bracket; those after the call are to the
right. In this simple example, you are inserting attribute values into object X.
The value specified for object is OBJECT_X_ID , the identifier of object X.
descriptor-list contains descriptors for a single-valued attribute of type H, and
two values of a multivalued attribute of type C. The value-position parameter
specifies that the values of C are to be inserted after the last currently existing value.
After the call, the three attribute values are shown inserted in object X.
Note. If you specify a value-position of 0 for a multivalued attribute, new values are
inserted before any initial value inserted in the object when GPI_OM_CREATE_ created it.