If you perform save-while-active operations that can result in objects that are saved with partial transactions, it is recommended that you use Backup, Recovery, and Media Services (BRMS). You can use BRMS to automate your backup and recovery operations. BRMS automatically applies changes to objects with partial transactions and restores them to a usable state.
If an object is saved with partial transactions, FROMENT(*LASTSAVE) will be required when applying or removing journaled changes on the restored version of the object.
When you use the character-based interface to restore objects with partial transactions, perform the following steps to restore libraries CHK and SAV:
RSTLIB SAVLIB(CHK) DEV(TAP01) RSTLIB SAVLIB(SAV) DEV(TAP01)
If the journals still exist on the system, they are not restored. However, this is not a problem.
If they did not exist, the server will restore the journal objects before the other objects.
RSTOBJ OBJ(attached-receiver-at-save-time) + SAVLIB(receiver-library) + DEV(TAP01) + OUTPUT(*OUTFILE)OUTFILE(lib/file)
If the attached receivers were in CHK or SAV when you saved the data and they did not exist prior to the RSTLIB operation, they were restored as part of that RSTLIB operation
RSTOBJ OBJ(other-needed-receivers) + SAVLIB(receiver-library) + DEV(TAP01)
If any objects received changes during the save operation, and they were under commitment control, the commit boundaries will be preserved on the following APYJRNCHG commands. If you do not wish to have the commitment control boundaries preserved, then you would need to specify CMTBDY(*NO) on the following APYJRNCHG commands.
APYJRNCHG JRN(jrnlib/jrnname) + FROMENT(*LASTSAVE) + OBJ((CHK/*ALL)) + TOENTLRG(seq#-for-application-boundary) APYJRNCHG JRN(jrnlib/jrnname) + FROMENT(*LASTSAVE) + OBJ((SAV/*ALL)) + TOENTLRG(seq#-for-application-boundary)
If multiple journals are involved, then repeat these commands for each journal specifying the correct sequence number (TOENTLRG parameter) that identifies the desired application boundary. Note that the TOENTLRG sequence number is very likely different for each journal in CHK and SAV, but they all identify a common application boundary.
APYJRNCHG JRN(jrnlib/jrnname) + OBJ((CHK/*ALL)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + FROMENT(*LASTSAVE) + TOENTLRG(seq#-for-application-boundary) APYJRNCHG JRN(jrnlib/jrnname) + OBJ((SAV/*ALL)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + FROMENT(*LASTSAVE) + TOENTLRG(seq#-for-application-boundary)
In the situation where the journal is restored, and the journaled objects for which changes are going to be applied were saved prior to V5R3, the server cannot determine the correct receiver range. Therefore, the correct range of receivers must be specified on the RCVRNG parameter. Note that the attached receiver at the time that the libraries were saved is the specified starting journal receiver. If the journaled objects for which changes are going to be applied were saved in V5R3 or later, then the server can determine the correct receiver range when the default of RCVRNG(*LASTSAVE) is used. In this situation, the apply command from step a is correct.
If multiple journals are involved, then repeat these commands for each journal specifying the correct sequence number (TOENTLRG parameter) that identifies the desired application boundary. Note that the TOENTLRG sequence number is very likely different for each journal in CHK and SAV, but they all identify a common application boundary.
APYJRNCHG JRN(jrnlib/jrnname) + OBJ((filelib/filename filembr)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + FROMENT(seq#-for-start-of-save-entry) + FROMENT(*LASTSAVE) + TOENT(seq#-for-application-boundary)
If you are not using V5R3 and the most recent save of the objects is not being used, FROMENT(*LASTSAVE) cannot be specified on the APYJRNCHG commands. An individual sequence number must be specified for each of the objects in libraries CHK and SAV
Some of the APYJRNCHG commands could specify multiple objects if there is a continuous series of start-of-save entries in the journal. The members identified by the continuous series of start-of-save journal entries could be applied to with a single APYJRNCHG command by specifying the earliest sequence number of all the start-of-save entries in the continuous series for the FROMENT parameter. If you are using V5R3, use the *LASTSAVE value in the FROMENT parameter.