Rebuild Options - /f

The /f option is used to validate an indexed file. If the file is corrupt, Rebuild returns a non-zero value.

Parameters
c Specifies the validation to be performed. The default is 10.
Value Description
2 Checks the structure of the free space list (FSL).
8 Checks the index file structure.
256 Checks the data file structure with file open for sharing in another process. You cannot specify this check in combination with any other check.

You can select a combination of checks 2 and 8 by adding the numbers together. The more checks you perform, the longer the validation takes.

d Specifies the message level.
Value Displays
0 Nothing.
1 Error messages only.
2 Messages showing the options you have specified.
3 Information about the file. This includes key definition, records lengths, data compression, and the version of the file handler that created and updated the file.
4 The different types of record present in the file:
1 IDXFORMAT"4" information record.
2 Deleted record.
3 System record.
4 Data record.
5 Data record that has been reduced in size by a rewrite.
6 Data record that has been increased in size by a rewrite, and therefore cannot fit into the original record area. Instead, this record points to another record area that contains the record.
7 The record pointed to by a type 6 record.
8 The record pointed to by a type 6 record.
5 Statistics about each key structure. This includes information about how much space is being saved by key compression.

These values are cumulative, so if you specify level 4, you will also receive messages at levels 1, 2 and 3. The default is 5.

Examples
rebuild test.dat -f:c8

checks the structure of the index file.

rebuild test.dat -f:d1

specifies error messages only.

rebuild test.dat -f:c2d1

checks the structure of the FSL and specifies error messages only.

rebuild test.dat -f

Performs a full integrity check on a file, displaying all possible information. This is the same as specifying -f:c10.

Note: The display might end with the message:

File is corrupt

This means that the control information in the file is not consistent with the data. For example, a record may have been deleted but the list of deleted records does not include it. Such a file is reported as corrupt, even though the data itself is not corrupt.

Related Topics