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

Chapter 4 93
Using the Database
Opening the Database
4 Using the Database
After you design the database, create the root file, and build the data sets, you can write
application programs to enter and use the data. Programs written in BBASIC, C,
COBOL II, FORTRAN 77, or Pascal gain access to the database through calls to
TurboIMAGE/XL procedures. RPG programs contain specifications used by the Report
Program Generator to make calls to the TurboIMAGE/XL procedures for you. This chapter
contains a text discussion of the procedures used to open the database and to enter, read,
update, and delete data; it also contains information on locking, transaction logging,
checking procedure status, and interpreting errors. Use this chapter with chapter 5 which
gives details about each procedure call, its parameters, and status information.
NOTE
Before application programs can be executed, the database must be created
using the TurboIMAGE/XL utility program DBUTIL described in chapter 8.
Opening the Database
Before you can gain access to the data, the process you are running must open the
database with a call to the DBOPEN procedure. A process is a unique execution of a
particular program by a particular user at a particular time, as described in the MPE/iX
Intrinsics Reference Manual. In opening a database, DBOPEN establishes an access path
between the database and your program by doing the following:
Verifying your right to use the database under the security provisions provided by the
MPE/iX file system and the TurboIMAGE/XL user-class-password scheme.
Determining that the access mode you have requested in opening the database is
compatible with the access modes of other users currently using the database.
Opening the root file and constructing the control blocks to be used by all other
TurboIMAGE/XL procedures when they are executed. The root file remains open until
the database is closed.
Note that DBOPEN does not open the individual data sets that compose a database.
DBOPEN also determines if the operating system supports the native language as defined in
the root file. The following error message is returned if the language attribute of the
database is not supported by the current system configuration:
Language is not supported
Refer to Chapter 6 for more information on Host Language Access and appendix A for
more information on error messages.