TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
244 Chapter6
Host Language Access
Model Program
Model Program
This section shows the model for the example programs that run against the ORDERS
database. You may wish to skip this section if you are an experienced TurboIMAGE/XL
programmer.
The main entry point for the application is a numbered list of functions that can be
performed by calling the various routines. Each routine is made up of one or more tasks
that are implemented through TurboIMAGE/XL intrinsic calls. Each call contains one or
more parameters, some of which are used to pass their assigned values to
TurboIMAGE/XL intrinsics. These values determine the outcome of the intrinsic. Other
parameters are used to receive data and status information from TurboIMAGE/XL
intrinsics.
This model attempts to familiarize you with generic techniques for making
TurboIMAGE/XL intrinsic calls. Additionally, the model reiterates the importance of
defining TurboIMAGE/XL transactions for logging and recovery.
The conventions used throughout the model and the structure of the program are
explained immediately preceding the model program.
ORDERS Database Schema
Figure 6-1. contains the list file output printed when the schema of the sample ORDERS
database is processed. This schema is shown earlier in chapter 3, but is repeated here for
easy reference when reading through the model program. Use it to refer to the data set and
data item names used in the model program.
NOTE
Because the Schema Processor, DBSCHEMA, upshifts alphabetic characters,
programs must specify data set and data item names in all uppercase
characters. Take note of this if the programming language you use does not
require uppercase characters.
Figure 6-1. ORDERS Database Schema Listing
PAGE 1
HEWLETT-PACKARD 30391C.05.00 TurboIMAGE/3000: DBSCHEMA TUE, JAN 11
$CONTROL LIST,LINES=46
$PAGE "SCHEMA FOR DATABASE ORDERS"
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT; << CUSTOMER CREDIT OFFICE >>
12 BUYER; << BUYER - RESPONSIBLE FOR PARTS INVENTORY >>
13 SHIP-REC; << WAREHOUSE - SHIPPING AND RECEIVING >>
14 CLERK; << SALES CLERK >>
18 DO-ALL; << FOR USE BY MGMT >>