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

Chapter 6 253
Host Language Access
ORDERS Database Model Program
*
* CALLED BY: Main Line
*
* CALLS: DBGET in mode 7 (calculated read)
BEGIN ROUTINE
Product_Buffer is made up of:
Stock#
Description
OBTAIN List "
@
;"
OBTAIN Key_Item_Value "STK30040"
CALL DBGET (DBname, Product_Master, Mode7_Calculated, Status, List,
Product_Buffer, Key_Item_Value)
ERROR CHECKING
DISPLAY the Product_Buffer
____________________________________________________________________
Stock# Description
END ROUTINE
Retrieving Data Serially (with Set Level Locking)
(USER SELECTS 5 TO RETRIEVE CUSTOMER DATA)
ROUTINE: List_All_Customers
* OBJECTIVE: This routine demonstrates serial access by listing
* all customer records. For the sake of consistency,
* the data set is locked for exclusive access,
* then the data is read serially.
*
* ACCESS: Mode 1 - Shared Modify Access
*
* CALLED BY: Main Line
*
* CALLS: DBLOCK in mode 3 (unconditional)
* DBGET in mode 2 (forward read)
* DBUNLOCK in mode 1 (unlock)
BEGIN ROUTINE
Customer_Buffer is made up of:
Account
Last-Name
First-Name
Initial
Street-Address
City
State
Zip
Credit-Rating
CALL DBLOCK (DBname, Customer_Master, Mode3_Unconditional, Status)
ERROR CHECKING
OBTAIN List "Account, Last-Name, First-Name, Initial;"
START LOOP<
CALL DBGET (DBname, Customer_Master, Mode2_Forward, Status, List,
Customer_Buffer, Not_Used_Parm)