HP 3000 Manuals

Ch 6. Accessing Databases and Files [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation


HP Transact Reference Manual

Chapter 6  Accessing Databases and Files 

Transact's data management facilities allow you to use databases, KSAM
files, and MPE files without making intrinsic calls.  The data management
interface is built into a common set of verbs that use a common set of
special purpose registers.  This chapter covers:

   *   Using databases with Transact.

   *   Using KSAM and MPE files with Transact.

When using databases, KSAM files, and MPE files through Transact, the
verbs and modifiers specify particular functions.  For example,
FIND(CHAIN) retrieves all entries that have a particular key value from a
database or KSAM file.  The key value is specified in the KEY and
ARGUMENT registers.  Similarly, you can use FIND(SERIAL) to sequentially
scan a database, KSAM file, or MPE file for all entries that meet the
selection criteria set up in the MATCH register.

The flexibility provided by each verb and modifier is enhanced by the
special registers.  Please see Chapter 4 for a description of the
register functions.  The following are examples of when these special
registers are used:

   *   The key register contains the key for keyed selection.

   *   The match register contains criteria for selecting particular
       records or entries.

   *   The update register specifies the data item to update and its new
       value.

   *   The status register contains values used in error handling.  With
       automatic error handling, the status register is set to the number
       of selected records for the file or database being accessed.  When
       automatic error handling is suppressed, the status register is set
       to the subsystem error number if an error occurs.

Although you can take all data definitions from a data dictionary, in the
SYSTEM statement of the program you must name each file or database used
by your program.  You need not name the individual data sets.  For a
database, you can also specify a password, a locking scheme, and an open
mode in the SYSTEM statement.  For a file, you can specify the access
options (aoptions) and file options (foptions) to be used when opening
the file.



MPE/iX 5.0 Documentation