Rebuilding a Data Source

In this section:

How to:

Reference:

The Rebuild tool provides a number of useful project management utilities. Rebuild enables you to restructure data sources, rebuild indexes, and check the integrity of data sources.

Note: You can only use this utility with FOCUS data sources.


Top of page

x
Procedure: How to Use the Rebuild Utility

To open the Rebuild dialog box:

  1. Choose Utilities from the Command menu, then choose Rebuild from the cascading menu.

    The Rebuild dialog box opens.

  2. Select a Rebuild option.

    For more information, see Rebuild Dialog Box and the individual procedures for each of the Rebuild options.


Top of page

x
Reference: Rebuild Dialog Box

Choose Utilities from the Command menu, and Rebuild from the Utilities cascading menu to display the Rebuild dialog box. The Rebuild dialog box has the following fields and options:


Top of page

x
Rebuilding a Disorganized File

This option in the Rebuild dialog box enables you to:


Top of page

x
Rebuilding the Index

How to:

When you first create a Master File in the Synonym Editor, you specify the fields that you want indexed. Sometimes, after data is entered, you may need to index an additional field that was not originally specified as an index field.

The first step is to alter the Master File to indicate that the field should be indexed. Altering the Master File does not actually create the index. To do this, you must use the Rebuild utility after you index a field.



x
Procedure: How to Index a Field After Data Is Entered

From the Synonym Editor, select the field to be indexed, and then click the I - Index check box under the FIELDTYPE attribute.

or

Open and edit the Master File as text in the Text Editor. For instructions on indexing a field as text, see the Describing Data With WebFOCUS Language manual.

After you index a field you must rebuild the index. See How to Rebuild the Index.



x
Procedure: How to Rebuild the Index
  1. In the Rebuild dialog box, select Index a field.
  2. In the Filename box, type a data source name or click Browse and select a data source from the list.
  3. In the Field to Index box, type the name of the field you want to index.

    To index all the fields designated as index fields in that data source, type an asterisk (*) in the Field to Index box.

  4. Click OK.

    The Rebuild utility rebuilds the data source, creating an index for all specified fields.

For more information on indexing fields, see the Describing Data With WebFOCUS Language manual.


Top of page

x
Checking the Integrity of a Data Source

How to:

It is rare for the structural integrity of a FOCUS data source to be damaged. Structural damage will occasionally occur, however, during a disk drive failure or if an incorrect Master File is used. In this situation, you can check the integrity of the Master File. Checking the integrity of a Master File performs the following essential tasks:

Although checking the integrity reports on a good deal of data that would otherwise be lost, it is important to remember that frequently backing up your FOCUS data sources is the best method of preventing data loss.

Checking the Master File integrity will occasionally fail to uncover structural damage. If you have reason to believe that there is damage to your data source, though results from checking the integrity indicates otherwise, there is a second method of checking file integrity. This method uses the ? FILE and TABLEF commands. For more information, see the Describing Data With WebFOCUS Language manual.



x
Procedure: How to Check the Structural Integrity of a FOCUS Data Source

In the Rebuild dialog box, select Check the integrity of a file.

If the Rebuild utility encounters an error during the check, it logs a message for you. You should then attempt to recover as much of the data source as possible or restore it from backup.


WebFOCUS