OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
A-31
object :=
local_object_2;
local_rc := GPI_OM_INSERT_
( root_id,
OM_POSITION_AT_END,
descriptor_list,
descriptor_count);
END; -- then
END; -- then
END; -- then
END; -- then
END -- then
ELSE
printf (" MH_C_OR_NAME doesn't exist. ");
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
RETURN (local_rc);
END; -- End build_and_insert_messagerd_obj
?page
--------------------------------------------------------------------------
-- Function Name: build_root_object --
-- --
-- Arguments: session IN --
-- root_id OUT --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function creates the root object and calls a --
-- function to insert the root-level attributes. Then --
-- it calls each function that builds and inserts --
-- subobjects into the root object. When this function--
-- is finished, the root object/message is ready to be--
-- transferred out. --
--------------------------------------------------------------------------
INT PROC build_root_object (local_session, root_id);
INT local_session;
INT(32) .root_id;
BEGIN
INT
local_rc; -- Return code from the function call
-- Create the root object
local_rc := GPI_OM_CREATE_ ( MH_C_MESSAGE,-- Class of the object
OM_FALSE, -- Without defined initial
-- values
root_id,
, -- Not required for the root
-- object
local_session);
-- Insert all attributes for the root
IF (( local_rc = OM_RC_SUCCESS ) OR ( local_rc = ZGPI_RC_WARNING )) THEN