Remember that a transaction log file goes with RMSfiles one backup generation before the transaction log file. For example, the current transaction log file goes with the last backup, and the transaction log file on the last backup goes with the RMSfiles on the next to the last backup.
Follow these steps to recover damaged RMSfiles from a transaction log.
1. Backup all logged RMSfiles and the transaction log file just in case something happens during the recovery process. You should do this on a new tape or set of diskettes, not on your next backup set in rotation.
1. Restore all logged RMSfiles to their original locations. You MUST NOT restore the transaction log file at this point.
1. Run the plog (C-3) program to print the transaction log file. This also performs consistency checks on the log file and the RMSfiles.
\> plog logfile
1. Run the drestore (C-3) program to restore the data from the transaction log file to the RMSfiles. Drestore can either restore just completed and consistent transactions (the usual case), or it can restore all transactions. If you restore all transactions, you may have to manually adjust records to make them consistent. Normally, only transactions immediately before the crash are incomplete. See C/Base Utilities Manual Chapter 5, Transaction Logging for more information about transactions.
\> drestore -v logfile (restores complete transactions)
\> drestore -vu logfile (restores all transactions)