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

Chapter 9 467
Using a Remote Database
Access Through a Local Application Program
DBUTIL. The remaining keyword parameters are checked by the command interpreter at
DBOPEN time.
If all of the above conditions are met, DBUTIL successfully activates the database-access
file, by changing the file code to the TurboIMAGE/XL reserved code 402, which makes it a
privileged (PRI V) file.
Deactivating a Database-Access File
In order to deactivate the database-access file, you use the DEACTIVATE command of the
DBUTIL utility program. Complete syntax for this program is given in chapter 8. Here is a
summary of the operating instructions:
:RUN DBUTIL.PUB.SYS
.
.
.
>>DEACTIVATE
database-access file name
DEACTIVATED
>>EXIT
You can do this if you want to edit the content of the database-access file or to prevent
access through this file to the remote database.
Referencing the Database
To reference the database from your local application program, use the database-access file
name instead of the root file name when calling the TurboIMAGE/XL procedure. The word
array specified as the base parameter must contain a pair of blanks followed by the
left-justified database-access file name and terminated by a semicolon or blank ( ).
TurboIMAGE/XL recognizes the 402 file code and establishes a communications link to
the remote HP 3000. If the database is successfully opened, TurboIMAGE/XL replaces the
pair of blanks with the baseid of the assigned Remote Database Control Block. The base
parameter must remain unchanged for the remainder of the process. When the application
program calls the DBCLOSE procedure or terminates execution, automatic REMOTE BYE and
DSLINE commands are issued to terminate the session and close the communications line.
Example
The example in Figure 9-5. illustrates how to create and activate a database-access file. A
description follows the example.
In this sample case, the file named ORDDBA is to be used to gain access to the ORDERS
database residing on a remote system in the PAYACCT account. The remote system is
referenced by nodename NODEX.
After the database-access file is created, it is enabled by using the DBUTIL utility program.