Removing journaled changes

 

Depending on the type of damage to the journaled object and the amount of activity since the object was last saved, removing changes from the object can be easier than applying changes to the object. Use the Remove Journaled Changes (RMVJRNCHG) command to remove changes from an object if you are journaling before-images.

The RMVJRNCHG command removes changes in reverse chronological order, starting with the most recent change.

On the RMVJRNCHG command, you identify the first journal entry to be removed from the object. This entry can be from:

You can control the changes that are removed from the object. For example, assume that an application updated data incorrectly for a period of time. In this case, you can remove the changes from the object until that application first opened the object.

You can stop removing journaled changes at:

You can ensure that commitment transaction boundaries are honored on the remove journaled changes operations by using the CMTBDY parameter on these commands.

If the system encounters a journal entry that causes the apply or remove process to stop, the commitment boundary may not be honored.

 

Error handling

When the system encounters a journal entry it cannot process, it ends remove processing either for that specific object or for the entire remove operation. You can specify how the system behaves when it encounters a journal entry it cannot process with the Object Error Option (OBJERROPT) on the Remove Journaled Changes (RMVJRNCHG) command. If you specify OBJERROPT(*CONTINUE), the system ends remove processing for the specific object, but it continues remove processing for the other objects in the remove operation. If you specify OBJERROPT(*END), the system ends processing for the entire remove operation. Actions of applying or removing journaled changes by journal code shows which entry types cause processing to end for an object.

 

Starting and ending points

Use the Display Journal (DSPJRN) command to identify the required starting and ending points. If you use a control language (CL) program for your recovery procedures, use the following:

You can also use the Retrieve Journal Entries (QjoRetrieveJournalEntries) API to retrieve the information into a High Level Language (HLL) program.

Another way to remove journaled changes is to Remove journaled changes with the WRKJRN command and follow the command prompts.

 

The apply and remove journaled changes output file

It is highly recommended that you use the apply and remove journaled changes output file when you remove journaled changes. The output file contains a record for each object that the remove operation processes. It contains a record for each object created and each object deleted during the remove. This output file is especially useful when the remove ends early. It is much easier to query the output file for the status of each object rather then searching through the job log messages. Also the messages are limited to 512 while the output file is not limited.

 

Parent topic:

Recovery of journaled objects

Related concepts
Actions of applying or removing journaled changes by journal code Use of the QAJRNCHG file