OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-53
Editing a Root Object
INT(32)
object_id, -- ID of object which
-- contains the attribute
value_position := 0D, -- Position of the first
-- value to be removed
maximum_number := 1D, -- Maximum number of values
-- to be removed
total_number; -- Total number of values
-- in object prior to
-- this remove
Procedure call:
status := GPI_OM_REMOVE_ ( object_id,
attribute_type,
value_position,
maximum_number,
total_number);
Deleting an Object
You call the GPI_OM_DELETE_ procedure to delete an object. The only parameter to
GPI_OM_DELETE_ is object, the identifier of the object to be deleted (input
parameter; required).
GPI_OM_DELETE_ deletes an object by invalidating the object identifier and releasing
all GPI resources allocated for the object. If the call to GPI_OM_DELETE_ returns
successfully, you can no longer access the object by its identifier. Further references to
this object identifier result in an error.
You can delete an object that is reserved. This has the same effect as calling
GPI_MT_FINISH_TRANSFER_IN_ with remove set to MH-CANCEL.
If you delete a subobject, the object is no longer represented by an attribute of its
superobject. In effect, the attribute is removed. If you delete a superobject, you also
delete all of its subobjects.
The following TAL example shows a call to GPI_OM_DELETE_ .
Data declarations:
INT
status; -- STATUS code
INT(32)
object_id; -- ID of object to be deleted
Procedure call:
status := GPI_OM_DELETE_ (object_id)
Note. If you do not retain a root object in GPI library memory space, it is deleted automatically
following a call to either GPI_MT_TRANSFER_OUT_ or GPI_MT_FINISH_TRANSFER_IN_ .