E Obsolete Database Utilities

Database Restructuring

Certain changes to an existing structure can be made without having to transfer data from the old database to the new one. The dbmods utility allows users to change many structural items, as described on the following pages.

More extensive changes are possible by first unloading the database and recreating the root file. The general sequence is:

  1. Run the dbexport to back up all data set entries.

  2. Purge the old database using DBPURGE or dbpurge.

  3. Redefine the database and use an editor to modify the schema.

  4. Run the schema program to create the new root file.

  5. Use DBCREATE or dbcreate to create and initialize the new data sets.

  6. Run the dbimport to load data entries from the backup into the new database.

The following are examples of changes that can be made to the database structure using the database utility programs.

Type of Access
Database Structural Change Program To Use
Adding, changing or deleting passwords and user-class numbers.dbmods
Changing data set read- and write-class lists.dbmods
Adding new data item definitions.dbexport/dbimport *
Removing data items not used as search items.dbexport/dbimport *
Rearranging the item order of a data set entry.dbexport/dbimport
Changing the length of string items. **dbexport/dbimport
Changing a data item or data set name and all references to it.dbmods
Changing numeric type items to another numeric type. ***dbexport/dbimport
Changing numeric type items to string items and vice versa ****dbexport/dbimport

* If a data item is added or deleted within a data set, the ASCII export file created by dbexport must be edited to conform with the new structure, or dbexport and dbimport must be used in -r (restructure) mode.

** Certain changes cannot be made to strings used as search items. For example, decreasing the string length may cause a duplicate search item value in a master data set. Increasing the length of a search item value causes no problems.

*** Numeric value conversions are performed between integer, dinteger, short, and real values. The resulting item values are as close to the starting values as the destination item type permits.

**** Requires dbexport and dbimport to be used in restructure mode.


Eloquence Database Manual - 19 DEC 2002