TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 6 249
Host Language Access
ORDERS Database Model Program
OBTAIN option ← user input
If option = 1
Then CALL Open_The_Database
and RETURN
If option = 2
Then CALL Get_Sales_For_Date
and RETURN
If option = 3
Then CALL Get_A_Customer_Record
and RETURN
If option = 4
Then CALL Get_A_Product_Record
and RETURN
If option = 5
Then CALL List_All_Customers
and RETURN
If option = 6
Then CALL Add_A_Product
and RETURN
If option = 7
Then CALL Update_A_Customer
and RETURN
If option = 8
Then CALL Delete_A_Product
and RETURN
If option = 9
Then CALL Rewind_Customer_Set
and RETURN
If option = 10
Then CALL Get_Data_Item_Info
and RETURN
If option = 11
Then CALL Get_Error_And_Explain
and RETURN
If option = 12
Then CALL Close_The_Database
and RETURN
EXIT LOOP if option = 12
END LOOP
END MAIN LINE
Opening the Database
(USER SELECTS 1 TO OPEN THE DATABASE)
ROUTINE: Open_The_Database
* OBJECTIVE: This routine opens the ORDERS database in mode 1
* for this application.
*
* ACCESS: Mode 1 - Shared Modify Access (SMA) with locking required
*
* CALLED BY: Main Line
*
* CALLS: DBOPEN in mode 1 (SMA)