OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-33
printfd (" WARNING! number: ", local_rc );
printf (" Object OR NAME");
local_rc := build_and_insert_orname_object (root_id);
-- Create and insert the recipient descriptor
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 (" Object MESSAGE RD");
local_rc := build_and_insert_messagerd_obj
(root_id);
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
END; -- then
RETURN (local_rc);
END; -- End build_root_object
?page
--------------------------------------------------------------------------
-- Function Name: print_attributes --
-- --
-- Arguments: number_of_printdata IN --
-- print_data IN --
-- descriptor_list IN --
-- max_descriptors IN --
-- --
-- Description: This procedure takes in two arrays of structures. --
-- The first one, print_data, lists the attributes --
-- that will be printed. The second one, --
-- descriptor_list, contains the data values that --
-- were returned from a previous GPI function call --
-- (GPI_OM_EXAMINE or GPI_OM_FETCH). The function --
-- loops through the first array, and uses --
-- search_descriptor to find the value position in --
-- the descriptor_list. Then, depending on the type, --
-- it prints the value. --
-- --
-- NOTE: In the case of the IM_T_TEXT, we use the --
-- GPI function GPI_OM_READ_ to demonstrate --
-- its usage. --
--------------------------------------------------------------------------
PROC print_attributes (number_of_printdata,
print_data,
descriptor_list,
max_descriptors);
INT(32) number_of_printdata; -- Number of attributes in the
-- array print_data
INT .print_data(PRINT_DEF); -- Array with the type and print
-- string for the attributes
STRING .EXT descriptor_list (OM_descriptor) ; -- Descriptor list
INT(32) max_descriptors; -- Number of elements in the
-- descriptor list
BEGIN