OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-13
 descriptor_list[0].type := MH_T_INFORMATION;
 descriptor_list[0].syntax := OM_S_OCTET_STRING;
 descriptor_list[0].value.z_string.length := 5D ;
 data_buf_in ':=' [%h04,%h03,%h00,%h00,%h00];
 @descriptor_list[0].value.z_string.elements := @data_buf_in;
 printf (" Create the object");
 local_rc := GPI_OM_CREATE_ ( MH_C_BILATERAL_INFORMATION,
 OM_TRUE, -- With defined initial 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 (" Remove the attribute PRMD_IDENTIFIER");
 -- Remove the unwanted PRMD_IDENTIFER attribute
 local_rc := GPI_OM_REMOVE_ ( local_object,
 MH_T_PRMD_IDENTIFIER, -- Type of the attr
 0D, -- Value position
 1D, -- Maximum number
 total_number);
 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");
 -- Insert bilateral_information attribute since it is required
 -- and was not created with the default values.
 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_BILATERAL_INFORMATION;
 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);
 END; -- then
 END; -- then
 END; -- then
 RETURN (local_rc);










