HP 3000 Manuals

Getting Started [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

Getting Started 

This section gets you started with DBChange Plus by explaining the
following procedures:

   *   Logging on to your system.
   *   Running the DBCPLUS program.
   *   Getting help.
   *   Specifying which database you want to restructure.
   *   Trying a few commonly used DBChange commands.
   *   Leaving the DBCPLUS program.

Running the DBCPLUS Program 

Before running DBChange Plus, first log on to the account and group where
the database you want to restructure resides.  You must log on to the
system as the database creator.  To log on, type the following:

     :hello user.account,group 

Once you are logged on, run the DBCPLUS program by typing the following:

     :run dbcplus.pub.sys 

     HP36386 (A.00.00) DBCHANGE  (c) COPYRIGHT Hewlett-Packard Co. 1985
     TUE, MAY 22, 1990,  8:46 AM

     >

The DBChange prompt (>) appears on your screen.

Getting Help 

DBChange Plus has an online help facility, which you can access anytime
you are running the DBCPLUS program in interactive mode.  You can either
see the entire list of DBChange Plus commands, or you can get information
about a specific command.  To see a listing of all the DBChange Plus
commands, issue the HELP command at the DBChange prompt as shown in the
following example.  After every 20 display lines, you are asked if you
want to continue, that is, if you want more commands listed.  Type either
y for yes or n for no; note that the default value is displayed in
uppercase.  For more information, refer to "HELP" in chapter 10,
"DBChange Plus Commands."

     >help 

     ADD FIELD            Adds a field to a data set.
     ADD ITEM             Adds a data item to a database.
     ADD PASSWORD         Adds a password to a database.
     ADD PATH             Adds a path to an existing detail data set.
     ADD SET              Adds a set to an existing database.
     ADD SORT             Adds a new sort item to an existing path.
     BASE                 Specifies the database to be modified.
     CANCEL COMMANDS      Cancels all changes since most recent BASE.
     CANCEL ERASE         Cancels a previous ERASE SET command.
     CANCEL REPACK        Cancels a previous REPACK SET command.
     CHANGE ATTRIBUTE     Changes data item attributes.
     CHANGE BLOCKFACTOR   Changes the block factor of a data set.
     CHANGE BLOCKMAX      Changes the maximum block length of data set.
     CHANGE CAPACITY      Changes the capacity of a data set.
     CHANGE DEVICECLASS   Changes the device class of a data set.
     CHANGE ITEM          Changes item attributes, order, security.
     CHANGE ITEMSECURITY  Changes user class access to a data item.
     CHANGE PASSWORD      Changes a password.
     CHANGE PRIMARYPATH   Changes primary path of a detail data set.
     CHANGE SETSECURITY   Changes user class access to a data set.
     CONTINUE [y/N] ? n 
     >

To get information about a specific command, type the command name after
issuing the HELP command.  In the example below, a list of all the ADD
commands is displayed:

     >help add 

     ADD FIELD            Adds a field to a data set.
     ADD ITEM             Adds a data item to a database.
     ADD PASSWORD         Adds a password to a database.
     ADD PATH             Adds a path to an existing detail data set.
     ADD SET              Adds a set to an existing database.
     ADD SORT             Adds a new sort item to an existing path.
     >

To get a description of the syntax and parameters and an example of a
command, use the HELP command, the DBChange command, and the keyword.
For example, HELP ADD ITEM produces syntax and parameter information
along with an example.

Specifying the Database to be Restructured 

Whenever the DBCPLUS program is invoked, you must issue the BASE command
to specify the database that you want to restructure.  In the following
example, the ORDERS database is specified for restructuring.  By default,
a new change file is created unless you specify otherwise.  A series of
change file status messages appear on your screen.

For example:

     >base orders 

      Creating new change file:
      Creating new change file: item information records
      Creating new change file: set information records
      Creating new change file: security table
      Creating new change file: control record

     >

How the Change File Works 

Whenever you issue the BASE command, you can either create a new change
file, update an existing change file, or purge an existing change file,
as described below.

Creating a New Change File.   

A new change file is created by using the NEW option, which is the
default, with the BASE command.  The change file is a privileged file
that is named dbnameCF.

Updating an Existing Change File.   

To update an existing change file, use the OLD option with the BASE
command.  The OLD option updates the change file by adding, deleting, or
revising information that already exists in the change file.  The
existing change file is copied to a file named dbnameCO. Upon exiting the
DBCPLUS program, or when the next BASE command is issued, dbnameCO is
purged.

Purging an Existing Change File.   

To purge an existing change file, use the PURGECF option with the BASE
command.  The change file can also be purged by using the CANCEL COMMANDS
command.  If you use the CANCEL COMMANDS command after issuing the BASE
command with the OLD option, the current dbnameCF is purged, and dbnameCO
is renamed dbnameCF.


CAUTION * Neither designate a database name as dbnameCF nor save and reuse an existing dbnameCF after the DBAPLUS program is run; otherwise, the root file and the database structure will not match the change file information. * Do not restore an old change file after the DBAPLUS program has completed successfully. Instead, create a new change file or use an XEQ command file.
For more information about the BASE command options, refer to chapter 10, "DBChange Plus Commands." Using Some DBChange Plus Commands You are now ready to use some DBChange Plus restructuring commands. In the following examples, a data set is added, a password is changed, and a field is deleted from the ORDERS database, respectively. For more information about the commands used in the following examples and other DBChange Plus commands, refer to the appropriate command heading in chapter 10, "DBChange Plus Commands." Adding a Data Item. To add a data item to the database, use the ADD ITEM command. In the following example, the data item REORDER-QTY is added. It should appear before the data item STATE in the schema listing. The item subtype is J and the sublength is 4. User classes 11 and 14 have read access. User classes 12 and 13 have write access. >add item reorder-qty (state) j 4 (11,14/12,13) Addition of data item accepted. Changing a Password. To change a password in the database, use the CHANGE PASSWORD command. In the following example, the password BUYER is changed to AGENT. Note that passwords are case sensitive. >change password BUYER AGENT Change of password accepted. Deleting a Field. A field is a data item that is associated with a data set. To delete a field, use the DELETE FIELD command. In the following example, the field UNIT-COST is deleted from the detail data set INVENTORY: >delete field inventory unit-cost Deletion of field accepted. Leaving the DBChange Program Use the EXIT command to leave the DBCPLUS program. When you exit, a series of messages summarizing the information stored in the change file appears on your screen. The MPE XL prompt (:) displays on your screen once the DBCPLUS program terminates. Following is an example of the EXIT command: >exit Please wait.....change file is being verified. HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985 ******************* DBCHANGE STATISTICS*************************** Number of databases prepared for rename: 0 Number of databases prepared for restructure: 0 Number of databases prepared for erase : 0 Number of databases prepared for repack: 0 Number of databases prepared for check : 0 Number of databases prepared for fix : 0 :


MPE/iX 5.0 Documentation