Previous Topic Next topic Print topic


Example of recovering a corrupt indexed file

Example 1

rebuild infile.dat

To get the key information, Rebuild reads the .idx file. Rebuild then reads the data file infile.dat to create a new index file.

If the index file is not present, you must use /k to supply information about the key structure.

Example 2

rebuild infile.dat, outfile.dat /d /e

Rebuild reads the input file to get the key information, and creates a new indexed file, by working through the data in physical order, skipping over duplicate records.

If the index file is not present, you must use /k to supply information about the key structure.

Example 3

rebuild infile.dat/k:1+20/i

To rebuild the indexed file, Rebuild reads the key definition information supplied by the /k option. In this case, there is a single key, starting at character position 1 and 20 characters in length.

Rebuild ignores any index files that already exist.

The key definition information that you supply using the /k option does not need to correspond to the key definition used when the file was created.

The /i option ensures that processing information is displayed when the rebuild is complete.

Previous Topic Next topic Print topic