OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-19
Building a Root Object
INT(32)
object_id, -- ID of new object
root_id, -- ID of root object to
-- which new object is to
-- be associated
initialize := OM_TRUE; -- Create object with defaults
Procedure call:
status := GPI_OM_CREATE_ ( class,
initialize,
object_id,
root_id);
Inserting an Attribute Value
You call the GPI_OM_INSERT_ procedure to insert attribute values into an object. A
single call to this procedure can insert values for one or more types of single-valued or
multivalued attributes. It can also insert a combination of values for single-valued and
multivalued attributes.
GPI_OM_INSERT_ passes information about each attribute in a descriptor. Each
descriptor contains an attribute type, syntax and value. A group of descriptors is passed
in an array called a descriptor list. A call to GPI_OM_INSERT_ takes a descriptor list
you provide and inserts that information into a specified object at the desired position.
Parameters for GPI_OM_INSERT_ are:
object (input)
value-position (input)
descriptor-list (input)
descriptor-count (input)
object specifies the identifier of the object into which values are to be inserted.
value-position specifies the position within the attribute at which the first new
value is to be inserted. If you specify OM-POSITION-AT-END, or you specify a
position that is not within the range of current positions for the attribute, the first new
value is inserted immediately after any existing values. For single-valued attributes, this
parameter is ignored.
descriptor-list is the list of descriptors to be processed. For details on the
various arrays used to pass descriptor lists, refer to the GPI Reference Manual.
descriptor-count specifies the number of descriptors to be processed.
Inserting Values for Single-Valued Attributes
If you specify an attribute type that refers to a single-valued attribute, and that attribute
is already present in the object when you call this procedure, an error is returned. This
Note. You cannot use this procedure to insert an attribute value that is a long string. To insert
a value that is a long string, use GPI_OM_WRITE_ .