OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-37
END -- then
ELSE
BEGIN
CALL show_gpi_status (ZGPI_ANY);
END; -- else
END; -- else
END -- then
ELSE
BEGIN
outline ':=' " Attribute doesn't exist. Name: "-> @outptr;
outptr ':=' print_data[counter].text FOR 32 -> @outptr ;
CALL WRITEX ( output_fn
, outline
, $INT(@outptr - @outline)
) ;
END; -- else
END; -- for
END; -- End print_attributes
?page
--------------------------------------------------------------------------
-- Function Name: print_object --
-- --
-- Arguments: local_type IN --
-- number_of_attri IN --
-- print_data IN --
-- f_desc_list IN --
-- desc_list IN --
-- max_number IN --
-- --
-- Return: Return code from the function call --
-- --
-- Description: This function prints all attributes from a sub- --
-- object. Print_data contains the type of the attri- --
-- bute and a pointer to the type in ASCII. The --
-- number of attributes doesn't have to be equal to --
-- the number of attributes in the message. --
-- f_desc_list contains the same attributes as --
-- print_data, but in the OM_descriptor structure. It --
-- is used as the input for GPI_OM_FETCH_, which --
-- will fill in the value fields. desc_list --
-- contains all the attributes from the same level as --
-- the object to be printed. --
-- The function will search through desc_list for --
-- the object identifier of local_type. With this --
-- object identifier, the function will call --
-- GPI_OM_FETCH_ to get the values of the attributes --
-- in f_desc_list. When it has these values --
-- (attribute_list_out), it calls the function --
-- print_attributes to print them to the screen. --
--------------------------------------------------------------------------
PROC print_object ( local_type,
number_of_attri,
print_data,
f_desc_list,
desc_list,
max_number);
INT local_type; -- Type of the object
INT(32) number_of_attri; -- Number of attributes
-- in the array print_data
INT .print_data(PRINT_DEF); -- Array with the type and