OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
TAL Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
A-50
 ELSE
 BEGIN
 printfd (" GPI_MT_WAIT failed! Error: ",
 rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
 END -- then
 ELSE
 BEGIN
 printfd (" GPI_MT_TRANSFER_OUT failed! " &
 "Error: ", rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
 END -- then
 ELSE
 BEGIN
 printfd (" BUILD_ROOT_OBJECT failed! Error: ", rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
 -- Close the session
 printf (" Call GPI_CLOSE_ ");
 rc := GPI_CLOSE_ (session);
 IF (( rc = OM_RC_SUCCESS ) OR ( rc = ZGPI_RC_WARNING )) THEN
 BEGIN
 printf (" --> was successful! ");
 IF ( rc = ZGPI_RC_WARNING ) THEN
 BEGIN
 printf (" *********** WARNING! **********");
 CALL show_gpi_status (ZGPI_ANY);
 END;
 printf (" ************************************");
 printf (" * Programming example is finishing *");
 printf (" ************************************");
 END -- then
 ELSE
 BEGIN
 printfd (" GPI_CLOSE failed! Error: ", rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
 END -- then
 ELSE
 BEGIN
 printfd (" GPI_OPEN failed! Error: ", rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
 END -- then
 ELSE
 BEGIN
 printfd (" GPI_INITIALIZE failed! Error: ", rc );
 CALL show_gpi_status (ZGPI_ANY);
 END; -- else
END; -- main 
 *******************************
 * Program example is starting *
 *******************************
 Call GPI_INITIALIZE_
 --> was successful!
 Call GPI_OPEN_
 --> was successful!
 Call BUILD_ROOT_OBJECT
Note. The following is a sample of output from the TAL program example.










