OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-24
 ---------------------------------------------------------------------
 -- NOTE: The values below are hardcoded. We recommend using the --
 -- values passed back in the environment object returned from--
 -- the GPI_OPEN_ call. --
 ---------------------------------------------------------------------
 STRUCT
 .EXT descriptor_list(OM_descriptor)[0:5];
 @data_buf_in_ptr := @data_buf_in;
 descriptor_list[0].type := MH_T_ADMD_NAME;
 descriptor_list[0].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[0].value.z_string.length := 11D ;
 @descriptor_list[0].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "POSTMASTER1" -> @data_buf_in_ptr;
 descriptor_list[1].type := MH_T_COUNTRY_NAME;
 descriptor_list[1].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[1].value.z_string.length := 2D ;
 @descriptor_list[1].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "US" -> @data_buf_in_ptr;
 descriptor_list[2].type := MH_T_PRMD_NAME;
 descriptor_list[2].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[2].value.z_string.length := 11D ;
 @descriptor_list[2].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "DEVELOPMENT" -> @data_buf_in_ptr;
 descriptor_list[3].type := MH_T_ORGANIZATION_NAME;
 descriptor_list[3].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[3].value.z_string.length := 4D ;
 @descriptor_list[3].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "MTA1" -> @data_buf_in_ptr;
 descriptor_list[4].type := MH_T_ORGANIZATIONAL_UNIT_NME_1;
 descriptor_list[4].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[4].value.z_string.length := 7D ;
 @descriptor_list[4].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "GWUSERS" -> @data_buf_in_ptr;
 descriptor_list[5].type := MH_T_SURNAME;
 descriptor_list[5].syntax := OM_S_PRINTABLE_STRING;
 descriptor_list[5].value.z_string.length := 6D ;
 @descriptor_list[5].value.z_string.elements := @data_buf_in_ptr;
 data_buf_in_ptr ':=' "UAGW11" -> @data_buf_in_ptr;
 printf (" Create ");
 local_rc := GPI_OM_CREATE_ ( MH_C_OR_NAME,
 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);










