TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

Chapter 6 259
Host Language Access
ORDERS Database Model Program
Obtaining Error Messages and Explanations
(USER SELECTS 11 TO OBTAIN ERROR MESSAGES AND ADDITIONAL
ERROR-RELATED INFORMATION)
ROUTINE:Get_Error_And_Explain
* OBJECTIVE: This routine generates an error message, corresponding
* to the existing value in the first word of the status
* parameter, by calling the DBERROR intrinsic.
* Additionally, the routine generates a description
* regarding the outstanding error message by calling the
* DBEXPLAIN intrinsic.
*
* ACCESS: Mode 1 - Shared Modify Access
*
* CALLED BY: Main Line
*
* CALLS: DBERROR
* DBEXPLAIN
BEGIN ROUTINE
Error_Buffer is made up of:
Error_Message
CALL DBERROR (Status, Error_Buffer, Error_Length)
DISPLAY the Error_Buffer
____________________________________________________________________
Error_Message
CALL DBEXPLAIN (Status)
END ROUTINE
Closing the Database
(USER SELECTS 12 TO CLOSE THE DATABASE)
ROUTINE: Close_The_Database
* OBJECTIVE: This routine closes the ORDERS database by calling
* the DBCLOSE intrinsic.
*
* ACCESS: Mode 1 - Shared Modify Access
*
* CALLED BY: Main Line
*
* CALLS: DBCLOSE in mode 1 (close)
BEGIN ROUTINE
CALL DBCLOSE (DBname, Not_Used_Parm, Mode1_Close, Status)
ERROR CHECKING
END ROUTINE