OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-18
Building a Root Object
Creating an Object With Defaults
If you set initialize to OM-TRUE, the object is created and filled with default first-
level attributes. The default attributes consist of all required and optional attributes that
have initial values (the initial values are used). The required and optional attributes for
each object class, and their initial values, are listed in the GPI Reference Manual.
When creating an object with its default attributes, note that some required attributes do
not have initial values defined. You must insert values for these attributes to fully define
the object. You can create an object with its default attributes, then edit the object to
replace specific attributes or change their values. This is a two-step process. You use
the GPI_OM_REMOVE_ procedure to remove and discard the unwanted attribute
values. You use the GPI_OM_INSERT_ procedure to insert replacements.
Creating a Subobject
Note that GPI_OM_CREATE_ can create a subobject, but it does not automatically
incorporate it into its superobject. After you have created a subobject, you use
GPI_OM_INSERT_ to insert the subobject into the superobject (you insert the subobject
as an attribute of the superobject).
Using the Object Identifier
The GPI_OM_CREATE_ procedure returns an object identifier assigned automatically
by the GPI service. You use the object identifier to specify the object when calling the
following GPI procedures:
Example: Creating an Object
The following TAL example shows a call to GPI_OM_CREATE_ to create an object of
class MH-C-BILATERAL-INFORMATION with default attributes.
Data declarations:
INT
status, -- STATUS code
class := MH_C_BILATERAL_INFORMATION ;
GPI_OM_COPY_ GPI_OM_INSERT_
GPI_OM_DELETE_ GPI_OM_LIST_
GPI_OM_EXAMINE_ GPI_OM_READ_
GPI_OM_FETCH_ GPI_OM_REMOVE_
GPI_MT_TRANSFER_OUT_ GPI_OM_WRITE_
GPI_MT_FINISH_TRANSFER_IN_