OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
A-25
IF (( local_rc = OM_RC_SUCCESS ) OR (local_rc = ZGPI_RC_WARNING)) THEN
BEGIN
IF ( local_rc = ZGPI_RC_WARNING ) THEN
printfd (" WARNING! number: ", local_rc );
printf (" Insert the object into the root object");
descriptor_count := 1D;
descriptor_list[0].type := MH_T_ORIGINATOR_NAME;
descriptor_list[0].syntax := OM_S_OBJECT;
descriptor_list[0].value.object.padding := 0D;
descriptor_list[0].value.object.object := local_object;
local_rc := GPI_OM_INSERT_ ( root_id, -- Root object identifier
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
END; -- then
END; -- then
RETURN (local_rc);
END; -- End build_and_insert_orname_object
?page
---------------------------------------------------------------------------
-- Function Name: build_and_insert_rdorname_obj --
-- --
-- Arguments: root_id IN --
-- object_id IN --
-- flag IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function creates the mh_c_or_name --
-- with the initial value parameter set to FALSE. The --
-- function then inserts all the required attributes --
-- into the object. It then inserts the object into --
-- the mh_c_message_rd object. --
-- --
-- NOTE: This function is called twice: once for each --
-- of the multivalued attributes --
-- (mh-c-message-rd). --
---------------------------------------------------------------------------
INT PROC build_and_insert_rdorname_obj ( root_id, object_id, flag );
INT(32) root_id; -- Object id from the root object
INT(32) object_id; -- Object id from the layer above
INT flag ; -- Flag for the second multivalued attribute
BEGIN
INT local_rc; -- Return code from the function call
INT(32)
descriptor_count := 6D, -- Count of the elements
local_object; -- Local object identifier
STRING .EXT data_buf_in[0:131];
STRING .EXt data_buf_in_ptr;
STRUCT
.EXT descriptor_list(OM_descriptor)[0:5];
@data_buf_in_ptr := @data_buf_in;
descriptor_list[0].type := MH_T_ADMD_NAME;
descriptor_list[0].syntax := OM_S_PRINTABLE_STRING;
descriptor_list[0].value.z_string.length := 11D ;