HP RPG/XL Programmer's Guide (30318-90001)

3- 27
Database Disc Files (TurboIMAGE)
The following list summarizes the advantages and disadvantages of using
TurboIMAGE databases. For detailed information on TurboIMAGE, see the
TurboIMAGE/XL Database Management System
manual.
Advantages:
* Query (QUERY) facilities
* Security to the data field level
* Data integrity in a multiuser environment
* Automatic maintenance of data interrelationships
* Data-dictionary approach to files
* Efficient memory usage in a multiuser environment
* Flexible locking strategies
* Rapid access by key
Disadvantages:
* No chronological access
* No partial, generic or sequential-within-limits key access
* Inefficient disc usage when actual file size varies considerably (the
maximum file size must be allocated regardless of the space that is
actually used)
* Inability to update a key field
* No undo for data deletes
* No duplicate keys in master data sets
* Databases are not processed by most system software (for example,
EDITOR, FCOPY and SORT)
* No one-step method for using standalone sorts
The remainder of this chapter tells you how to create and use TurboIMAGE
databases within RPG programs. To simplify the examples, a single
database (MARKET) is used throughout. MARKET keeps customer account
information and is used online by a marketing department. MARKET has
four data sets. D-ACCOUNTS is a detail data set having NAME-LAST and
ACCOUNT-NO as keys. The automatic masters, A-LAST-NAME and A-ACCOUNT-NO
keep track of these keys. M-SOURCE is a manual master data set that is
used to validate source codes and to keep track of customer responses by
source code. It has only a few fields, and is updated infrequently.
Figure 3-22 shows the structure of the MARKET database.