Recover a damaged journal with the WRKJRN command

The Work with Journal (WRKJRN) command can be used to recover a damaged journal.

Start of changeThe WRKJRN command associates the receivers with the recovered journals without you having to delete and restore the receivers. End of change

Option 6 on the Work with Journals display verifies that the journal is damaged before proceeding with recovery. If the journal is not damaged, an informational message appears.

For a description of the Work with Journals display, see the WRKJRN command in the online command help. To view the help, type WRKJRN on a command line, and press F1.

Recovery for a damaged journal guides you through the following steps:

  1. Start of changeThe system attempts to determine which objects are currently being journaled to the indicated journal. If the system cannot successfully build this list, a message appears before the recovery operation begins. For each object type whose journaling is being ended, a status message is sent indicating how many objects have ended.End of change
  2. Journaling is ended for all access paths that are currently being journaled to the specified journal.
  3. Start of changeJournaling is ended for all database files that are currently being journaled to the specified journal. Journaling is ended for all objects.End of change
  4. The system deletes the journal.
  5. Start of changeThe system presents the Recover Damaged Journal display, which asks you whether to restore or create the journal and what state to create the journal. The state is *ACTIVE or *STANDBY. If you have remote journals associated with your damaged journal it is suggested that you take the option to restore a previously saved version of the journal.End of change
    1. If the journal will be restored, the system prompts for the values that are needed for the restore operation.
    2. Start of changeIf the journal will be created, the system prompts for the receiver name and attributes with the CRTJRNRCV command prompt. The system prompts for values needed to create the journal with the CRTJRN command prompt, with known values that are shown.End of change
  6. Start of changeJournaling is restarted for all objects for which it was previously ended. The screen displays after each object type has been restarted. If there were no objects for a specific type, then that step is skipped. A status message is sent periodically while journaling is being started to update you on how many objects have started journaling.End of change
  7. Start of changeThe system now displays the Specify Journal Receivers screen. There are new input lines so you can enter specific receivers, generic receivers or *ALL. On the display you can enter a specific receiver, a generic name for journal receivers, or *ALL. Additionally, a library name can be specified to limit the search for receivers to only a specific library when finding receivers to associate with the newly created journal. Limiting the search to only certain receivers can significantly speed up the reassociation processing.End of change

    A journal receiver is associated with a journal if the journal receiver appears in the journal receiver directory. A receiver that was previously attached to a journal, but is not currently associated with a journal, cannot be used with the journal commands such as Display Journal (DSPJRN), Apply Journaled Changes (APYJRNCHG), Apply Journaled Changes Extend (APYJRNCHGX), and Remove Journaled Changes (RMVJRNCHG).

As the recovery of a damaged journal proceeds, the Display Journal Recovery Status display appears. The information about this display is updated as the operation progresses to indicate which steps have been completed, which steps have been bypassed, and which step will be run next. Whenever a user action is required, the status display is replaced by the appropriate prompt display.

The status field indicates the following operation status:

The first display you usually see after the first status display is the Recover Damaged Journal display. Use this display to choose whether the journal is to be created or restored.

Start of changeWhen the last step of the recovery process is complete, a message appears indicating that all objects for which journaling was started must be saved to establish a new recovery point.End of change

Start of changeIf the damaged journal had any remote journals associated with it and a previously saved version of the journal was not restored, use the Add Remote Journal (QjoAddRemoteJournal) API or Add Remote Journal (ADDRMTJRN) command to reassociate those remote journals. See Add remote journals for information about adding remote journals.End of change

Related tasks
Add remote journals
Related reference
Work with Journal (WRKJRN) command
Display Journal (DSPJRN) command
Apply Journaled Changes (APYJRNCHG) command
Apply Journaled Changes Extend (APYJRNCHGX) command
Remove Journaled Changes (RMVJRNCHG) command
Add Remote Journal (QjoAddRemoteJournal) API
Add Remote Journal (ADDRMTJRN) command