This example shows a typical restore procedure after you eliminate save-outage time in a library. Your exact use of the function may differ, based on your specific application requirements.
Perform the following steps when restoring libraries LIB1 and LIB2:
RSTLIB SAVLIB(LIB1) DEV(TAP01) RSTLIB SAVLIB(LIB2) DEV(TAP01)
If the journals still exist on the system, they are not restored. That is not a problem.
If they did not exist, the server will restore the journal objects before the other objects.
At the completion of these restore commands, the objects exist on the server, but they will not be in a consistent state in relationship to each other.
RSTOBJ OBJ(attached-receiver-at-save-time) + SAVLIB(receiver-library) + DEV(TAP01)
If the attached receivers were in LIB1 or LIB2 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)
The Work with Journal Attributes (WRKJRNA) and Display Journal (DSPJRN) commands can be helpful in finding the application boundary.
You can use the WRKJRNA command to determine the appropriate range of receivers you need for the ensuing Apply Journaled Changes (APYJRNCHG) operations. You can use the DSPJRN command to locate the exact sequence number that identifies the desired application boundary. If multiple journals are involved, you must locate the same application boundary (most likely identified by the timestamp) in each journal. You must also note the appropriate journal sequence number.
If any objects received changes during the save operation, and they were under commitment control, the commitment boundaries will be preserved on the following APYJRNCHG commands. If you do not want the commitment control boundaries preserved, then you specify CMTBDY(*NO) on the following APYJRNCHG commands:
APYJRNCHG JRN(jrnlib/jrnname) + OBJ((LIB1/*ALL)) + TOENT(seq#-for-application-boundary) APYJRNCHG JRN(jrnlib/jrnname) + OBJ((LIB2/*ALL)) + TOENT(seq#-for-application-boundary)
If multiple journals are involved, then repeat these commands for each journal specifying the correct sequence number (TOENT parameter) that identifies the desired application boundary. Note that the TOENT sequence number is very likely different for each journal in LIB1 and LIB2, but they all identify a common application boundary.
APYJRNCHG JRN(jrnlib/jrnname) + OBJ((LIB1/*ALL)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + TOENT(seq#-for-application-boundary) APYJRNCHG JRN(jrnlib/jrnname) + OBJ((LIB2/*ALL)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + TOENT(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 multiple journals are involved, then repeat these commands for each journal specifying the correct sequence number (TOENT parameter) that identifies the desired application boundary. Note that the TOENT sequence number is very likely different for each journal in LIB1 and LIB2, but they all identify a common application boundary. 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 works.
APYJRNCHG JRN(jrnlib/jrnname) + OBJ((filelib/filename filembr)) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + FROMENT(seq#-for-start-of-save-entry) + TOENT(seq#-for-application-boundary)
If you are prior to V5R3 and the most recent save of the objects are 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 LIB1 and LIB2.
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.