OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
A-20
descriptor_list[3].syntax := OM_S_ENUMERATION;
descriptor_list[3].value.enumeration := MH_AC_RELAYED ;
----------------------------------------------------------------------------
-- WARNING!! --
-- The MH_T_ARRIVAL_TIME should be set to the current time or --
-- a time in the future to keep the message from being --
-- non-delivered due to timeout of the message. The null value --
-- below works since the message is being looped back to the --
-- originator. The UTC time string formats are as follows: --
-- --
-- YYMMDDHHMMZ Year Month Day Hour Minute followed by the letter --
-- 'Z', use Greenwich Mean Time (GMT). --
-- YYMMDDHHMMSSZ as above with optional seconds, --
-- use Greenwich Mean Time (GMT). --
-- YYMMDDHHMMSS-HHMM string can end with + or - HHMM for time --
-- zone deviation from GMT time --
-- use local-time where --
-- local-time +/- deviation = GMT --
----------------------------------------------------------------------------
descriptor_list[4].type := MH_T_ARRIVAL_TIME;
descriptor_list[4].syntax := OM_S_UTC_TIME_STRING;
@descriptor_list[4].value.z_string.elements := OM_ELEMENTS_UNSPECIFIED;
descriptor_list[4].value.z_string.length := 0D ;
printf (" Create the object");
local_rc := GPI_OM_CREATE_ ( MH_C_EXTERNAL_TRACE_ENTRY,
OM_FALSE, -- Without defined intial values
local_object,
root_id, -- Root object identifier
); -- Session not necessary
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 (" Insert all required attributes");
local_rc := GPI_OM_INSERT_ ( local_object,
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);
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 (" Insert the object into the root object");
descriptor_count := 1D;
descriptor_list[0].type := MH_T_EXTERNAL_TRACE_INFO;
descriptor_list[0].syntax := OM_S_OBJECT;
descriptor_list[0].value.object.padding := 0D;
descriptor_list[0].value.object.object := local_object;
local_rc := GPI_OM_INSERT_ ( root_id,
IGNORED_FOR_SINGLE_VALUED_ATT,
descriptor_list,
descriptor_count);