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

Chapter 4 131
Using the Database
Closing the Database or a Data Set
Closing the Database or a Data Set
After you have completed all the tasks with the database, use the DBCLOSE library
procedure to terminate access to the database. When DBCLOSE is used for this purpose, all
data sets and the root file are closed, and the DBU control block is released to the MPE/iX
system. If there are no other concurrent users of the database, the DBB and DBG control
blocks are also released. All locks that you could still have on the database through the
closed access path are automatically released.
The DBCLOSE procedure can also be used to rewind or close access to a data set. Rewinding
consists of resetting to its initial state the dynamic status information kept by
TurboIMAGE/XL. If a detail data set is closed or rewound, the current path does not
change when the status information is initialized.
The purpose of closing a data set completely is to return the resources required by that
data set to the MPE/iX system without terminating access to the database. A typical
reason for rewinding a data set is to start at the first or last entry again when doing a
forward or backward serial read.