TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 6 289
Host Language Access
FORTRAN 77
Main Body of Program
In the following portion of the program, the $hp3000_16$ compiler directive allows the
FORTRAN 77 compiler to change the data alignment from a four-byte limit to a two-byte
limit. For example, the non-alignment caused by the Quantity field in the Sales data set
can be resolved using this directive.
$hp3000_16$
Program Fortran_For_TurboIMAGEXL
C
C This area will contain the main line for the
C FORTRAN 77 example.
C
Obtaining Error Messages and Explanations
The following procedure implements the Get_Error_And_Explain routine of the sample
program. In this procedure, DBEXPLAIN and DBERROR are called using FORTRAN 77.
DBEXPLAIN interprets the contents of the status parameter and prints a message on
$STDLIST. DBERROR returns a message in ERROR_Buffer, explaining the condition code
returned by TurboIMAGE/XL. At the end of the procedure, users can choose to abort or
continue the execution of this program. Note that aborting a process from within a
transaction would result in an incomplete transaction. It is good programming practice to
end your transaction, release your locks, and close any open database(s) before aborting
your process.
C***********************************************************************
Subroutine Get_Error_And_Explain
C Access : Mode 1 - Shared Modified Access
C
C
C Called By : Open_The_Database
C Get_Sales_For_Date
C Get_A_Customer_Record
C Get_A_Product_Record
C List_All_Customers
C Add_A_Product
C Update_A_Customer
C Delete_A_Product
C Rewind_Customer_Set
C Get_Data_Item_Info
C Close_The_Database
C
C
C Calls : DBERROR
C DBEXPLAIN
C
$list Off
$Include 'comon1'
$list On
C Prepare the error buffer for calls to DBERROR
C
Character Error_Buffer_Text*80