Troubleshooting
Problem
This document provides information about using the Remove Journaled Changes (RMVJRNCHG) command and it discusses the best practices of the command. Customized help with this command requires a consulting agreement because it requires knowledge of your unique environment. There is a fee / contract involved.
Resolving The Problem
This document provides information about using the Remove Journaled Changes (RMVJRNCHG) command.
"A user made some bad changes to my file. I do not have a recent save, and even if I did, I do not care to restore it. I just want the bad changes to go away now."
The Remove Journaled Changes (RMVJRNCHG) command can remove Update, Insert, or Delete operations from a file. You do not need to restore your file from backup.
| 1. | To be able to use RMVJRNCHG, you must be journaling Before and After images. Determine this by using the DSPFD command on your file. File is currently journaled . . . . . . . . : Yes Current or last journal . . . . . . . . . . : MYJRN Library . . . . . . . . . . . . . . . . . : PRODLIB Journal images . . . . . . . . . . . . . . : IMAGES *BOTH If you do not have IMAGES = *BOTH but you do have a recent save of the file, you can use the Apply Journaled Changes (APYJRNCHG) command. This involves applying journal entries up until the time of the bad records. Refer to document APYJRNCHG. To link to document click here . |
| 2. | Use the DSPJRN command to determine which sequence numbers you wish to remove. The following command shows all record level changes made to the file: DSPJRN JRN(PRODLIB/QSQJRN) FILE((PRODLIB/PRODFILE)) JRNCDE((R)) Press the Enter key. Write down the two sequence numbers that delimit the first and last bad entries. |
| 3. | Now we are ready to RMVJRNCHG by specifying sequence numbers. This command goes backwards in time, so the FROM entry is the most recent entry, and the TO entry is the oldest (Starting From entry = bigger number, To entry= smaller number). You should review parm CMTBDY and determine what value is need for your situation. RMVJRNCHG JRN(MYPRODJRN) FILE((MYFILE)) FROMENTLRG(200) TOENTLRG(100) Press the Enter key. |
Considerations
The TOJOBO parameter on the RMVJRNCHG command is on a per job basis; however, this does not pick the journal entries from that particular job. It removes all entries from all jobs based on the starting time of the job specified. So unless that is what you want, the sequence number option is probably the most accurate method.
If you want to peruse an outfile of your RMVJRNCHG activity, use the *OUTFILE option. This file has information such as Number of Entries removed and Object Name.
As with APYJRNCHG, not all entries can be applied and removed. You must use multiple commands to get around these unappliable entries.
Related Information
Historical Number
410111749
Was this topic helpful?
Document Information
Modified date:
03 February 2026
UID
nas8N1019013