When the system ends applying or removing journaled changes
The system ends applying or removing journaled changes as a result from one of the following items:
- Certain journaled entries
- A format error for a database physical file (such as an undefined entry for that file member)
- A logical error for a database physical file (such as updating a record that has not been inserted or a duplicate key exception)
- A logical error for a data queue (such as inserting a keyed entry into a non-keyed queue)
- Unexpected error processing an entry
When one of the previous items occur, the apply or remove journaled changes action can end either for the object or for the entire apply or remove operation. You can determine this behavior by using the Object Error Option (OBJERROPT) parameter on the Apply Journaled Changes (APYJRNCHG), Apply Journaled Changes Extend (APYJRNCHGX), or Remove Journaled Changes (RMVJRNCHG) commands.
When OBJERROPT(*END) is specified, for entries that end applying or removing journaled changes, a message identifying the reason for the end is placed in the job log, and the corresponding change is not made to the object. The message contains the sequence number of the journal entry on which the failing condition was detected. When OBJERROPT(*CONTINUE) is specified, message CPD7016 indicates what entry the apply or removed stopped at, and the reason code. This information is also available in the output file if one was generated. To correct the problem do the following:
- Analyze the error.
- Make the necessary correction.
- Start applying or removing journal changes again using the appropriate sequence number.
For example, if the entry that causes a RMVJRNCHG command to end is entry code F of type RG, reorganize the physical file member referred to in the journal entry. Use the same options that were originally specified on the reorganize request when the journal entry was recorded in the journal receiver. Resume removing journal changes by starting with the journal entry that follows the 'F RG' reorganize physical file member journal entry.
When you apply or remove journaled changes you also have the option to have the system send information about the operation to an output file. You can specify whether information is sent about all objects in the operation or only objects that have errors. To specify that the system sends information to an output file use the Output (OUTPUT) option on the APYJRNCHG, APYJRNCHGX, or RMVJRNCHG commands.
The APYJRNCHG, APYJRNCHGX, and RMVJRNCHG commands send an escape message and ends the operation if any required journal receiver defined by the RCVRNG parameter is not on the system and associated with the journal. Use the WRKJRNA command to select the Work with journal receiver directory display, to see which journal receivers are on the system and associated with the journal. The escape message contains the name of the required journal receiver if the reason code of message CPF7053 is 1 or if message CPF9801 is sent.
When the processing of applying or removing journaled changes ends with an escape message, the objects can be partially changed. To determine how many changes were applied or removed for each object do one of the following:
- Review the diagnostic messages in the job log prior to the final escape message for each object.
- Use the DSPJRN command to display the journal entries indicating completion of the command.
- If you specified to have the system send information to an output file, review the output file. The output file contains a record for each object that was processed. You can view that object's record to determine if processing completed successfully for that object.
The command completion journal entries by object type are as follows:
- Database physical file members
- F journal code and an entry type of AY or RC D journal code and entry type of DD
- Integrated file system objects
- B journal code and entry type of AJ
- Data area objects
- E journal code and entry type of EQ or EX
- Data queue objects
- Q journal code and entry type of QH
The Count field in the journal entry contains the number of journal entries that are applied or removed.
The system puts out a maximum of 512 diagnostic messages from Apply or Remove Journaled Changes. Therefore, it is recommended that you create an output file to determine how many changes were applied or removed for each object.
Parent topic:
Recovery of journaled objectsRelated concepts
Actions of applying or removing journaled changes by journal code Use of the QAJRNCHG file