OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-38
-- print string for the
-- attributes
STRING .EXT f_desc_list (OM_descriptor) ; -- Descriptor list for fetch
STRING .EXT desc_list (OM_descriptor) ; -- Descriptor list
INT(32) max_number; -- Number of elements in the
-- descriptor list
BEGIN
INT
exist, -- Position of the element in the array
local_rc; -- Return code from a function call
INT(32)
actual_string_len, -- Returns the actual number of bytes
total_string_len; -- Returns the total number of bytes
STRING
string_buffer[0:STRING_BUFFER_LEN]; -- Buffer for the strings
STRUCT
.EXT descriptor_list_out(OM_descriptor)[0:MAX_DESCRIPTORS];
-- Locate the object in the descriptor list
exist := search_descriptor ( local_type,
desc_list,
max_number);
IF ( exist > -1 ) THEN
BEGIN
-- This object identifier is only needed to show
-- the use of the function GPI_OM_READ_.
read_object_id := desc_list[exist].value.object.object;
-- Fetch the attributes from the object
local_rc := GPI_OM_FETCH_ ( desc_list[exist].value.object.object,
OM_TRUE, -- Values returned
f_desc_list,
number_of_attri,
descriptor_list_out,
string_buffer,
STRING_BUFFER_LEN,
actual_string_len,
total_string_len);
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 );
CALL print_attributes ( number_of_attri,
print_data,
descriptor_list_out,
number_of_attri);
END; -- then
END -- then
ELSE
printf (" Object doesn't exist!");
IF ( local_rc <> OM_RC_SUCCESS ) THEN
CALL show_gpi_status (ZGPI_ANY);