OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-39
END; -- End print_object
?page
--------------------------------------------------------------------------
-- Function Name: print_message --
-- --
-- Arguments: root_id IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function will print all the attributes in the --
-- message that this program transfered in, under the --
-- assumption that the received message is the same as--
-- the one transfered out. It uses GPI_OM_EXAMINE_ and--
-- GPI_OM_LIST_ (for the multivalued attribute) to --
-- extract values from the received message. These --
-- are printed by calling the functions --
-- print_attributes and print_object. --
--------------------------------------------------------------------------
INT PROC print_message ( root_id );
 INT(32) root_id;
BEGIN
 INT
 exist, -- Position of the attribute in the descriptor
 -- list
 counter, -- Counter for a loop
 local_rc; -- Return code from a function call
 INT(32)
 total_number, -- Total number of attributes
 total_number_2, -- Total number of attributes
 actual_number, -- Returns the actual number of bytes
 actual_number_2, -- Returns the actual number of bytes
 actual_string_len, -- Returns the actual string length in the
 -- buffer
 actual_string_len_2, -- Returns the actual string length in the
 -- buffer
 total_string_len, -- Returns the total number of bytes
 total_string_len_2, -- Returns the total number of bytes
 max_print_def := 7D;-- Number of attributes to print
 STRING
 .EXT string_buffer[0:STRING_BUFFER_LEN], -- Buffer for the strings
 .EXT string_buffer_2[0:STRING_BUFFER_LEN]; -- Buffer for the strings
 STRUCT
 .print_arr(PRINT_DEF)[0:6];
 STRUCT
 .EXT descriptor_list(OM_descriptor)[0:MAX_DESCRIPTORS];
 STRUCT
 .EXT descriptor_list_2(OM_descriptor)[0:MAX_DESCRIPTORS];
 STRUCT
 .EXT descriptor_list_3(OM_descriptor)[0:MAX_DESCRIPTORS];
 STRUCT
 .EXT f_descriptor_list(OM_descriptor)[0:MAX_DESCRIPTORS];
 -- Descriptor list for fetch
 print_arr[0].type := MH_T_ALTERNATE_RECIP_ALLOWED;
 print_arr[0].text ':=' " Alternate Recip Allowed: ";
 print_arr[1].type := MH_T_CONTENT_IDENTIFIER;
 print_arr[1].text ':=' " Content Identifier: ";
 print_arr[2].type := MH_T_CONTENT_RETURN_REQUESTED;
 print_arr[2].text ':=' " Content Return Request: ";










