mkconvert Utility - Convert Existing MKEYED File to Recoverable Format

Syntax

mkconvert original_file1{ original_file2…}

Description

The mkconvert utility is available in Revision 2.1x, but superseded by mrebuild in Revision 3.0.

The mkconvert utility is a standalone executable that converts MKEYED files to a format that allows file recovery if they become corrupted. Once converted, access the file just like the original file. Executed at the operating system level, the mkconvert utility checks for the TMP environment variable and uses the specified directory to build a temporary file. If this environment variable is not set or is null, the utility checks the TEMP environment variable. If neither environment variable specifies a directory, then it uses the UNIX /tmp or the current Windows directory.

The file conversion cannot take place if opened by any process.

For UNIX, this utility looks for config.BBx in the current working directory or the value of the environment variable BBCONFIG=. The mkconvert utility also makes a copy of the original file with a .old extension.

For each stored record, the new format adds a four-byte tag, key data for a single-keyed MKEYED file, and a four-byte checksum of the key and record data, which will detect data corruption in the record. This information enables efficient recovery of record and key data, even if the data search tree is corrupt or missing.

The tag, key data, and checksum information cause the new format file to be larger than the original file. The size increase is dependent on the number of records in the file.

To create new MKEYED files in this format, use SETOPTS byte 7 bit $20$. Using the mkconvert utility on a file created with this SETOPTS bit produces a message that the file is already formatted for corruption recovery.

Parameter

Description

original_file

An existing MKEYED file. Conversion renames the file original_file.old.

Ensure that there is adequate disk space to store the copy of the file.

The mkrecover utility recovers corrupted files previously formatted for corruption recovery.

On UNIX systems with large files, the TEMP environment variable may need to be set to reference a filesystem with adequate space.

See Also

Alphabetical Utilities

Functional Listing of Utilities