Previous Topic Next topic Print topic


Recovery process description

If the recover1 program is successful, the exit code is set to 0. If the recover1 program is canceled by the operator, the exit code is set to 2. Otherwise, the exit code is set to 1.

You may produce a list of the support modules loaded by the recover1 program by defining the environment variable RM_DYNAMIC_LIBRARY_TRACE. The listing will indicate which Terminal Interface support module is used, only the terminfo module is included with Visual COBOL. The Automatic Configuration File module is not included with Visual COBOL. This information is most helpful when attempting to diagnose a problem with support modules.

Note: The information will be visible only if you enter the recover1 command without any parameters. In this case, recover1 will show the proper form for the command and the list of support modules.

The recover1 program attempts to recover the indexed file in place; that is, the program rebuilds the internal file structure in the actual file being recovered. If necessary, the Key Information Block (KIB) is rebuilt and any corrupted data blocks are repaired. Corrupt data blocks may result in loss of some data records. Because of this feature, it is strongly recommended that you either backup the file or copy the indexed file to be recovered to some other directory or pathname as additional security. Any records that cannot be successfully reindexed into the file due to invalid duplicate key values, or invalid record sizes, are decompressed (if compression is selected for the file), converted to the native code set, and then written to drop-file. recover1 should be able to handle most kinds of indexed file corruption problems, but some fatal errors may still cause the recovery to fail. Any fatal error is displayed and causes the program to terminate. Broken hardware should be suspected in many of these cases.

drop-file can be in fixed- or variable-length format; this is set by recover1 based on whether indexed-file is fixed- or variable-length format. Records placed in drop-file were those undergoing change at the time of the system failure that required recovery or have invalid record sizes. Investigate any records appearing in drop-file and make the appropriate corrections to indexed-file.

Previous Topic Next topic Print topic