OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-16
 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 the 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 (" " &
 "Use GPI_OM_WRITE to write the first line");
 -----------------------------------------------------------------------
 -- Note: It's not necessary to use the GPI_OM_WRITE_ function to add --
 -- the content of the attribute IM_T_TEXT in this example. --
 -- GPI_OM_WRITE is only used to demonstrate the usage of this --
 -- function. --
 -----------------------------------------------------------------------
 data_string ':=' "This is the content of the message.";
 element_number := 35D;
 string_offset := ZGPI_NEW_VALUE;
 local_rc := GPI_OM_WRITE_ ( local_object,
 IM_T_TEXT, -- Attribute type
 IGNORED_FOR_SINGLE_VALUED_ATT,
 string_offset, -- String offset
 data_string, -- Data string
 element_number, -- Element number
 OM_S_IA5_STRING ); -- Syntax
 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 (" " &
 "Use GPI_OM_WRITE_ to write the second line");
 -- Write the second string to the attribute
 data_string ':=' "This is the second line.";
 element_number := 24D;
 local_rc := GPI_OM_WRITE_ ( local_object,
 IM_T_TEXT, -- Attribute type
 IGNORED_FOR_SINGLE_VALUED_ATT,
 string_offset, -- The output from
 -- the previous call
 -- is the new input
 data_string,
 element_number,
 OM_S_IA5_STRING );-- Syntax
 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 );










