This example shows a typical restore procedure after you eliminate save-outage time in a directory. Your exact use of the function may differ, based on your specific application requirements.
Perform the following steps when restoring directory MyDirectory:
RST DEV('/QSYS.LIB/TAP01.DEVD') + OBJ('/MyDirectory')
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.
RST DEV('/QSYS.LIB/TAP01.DEVD') + OBJ('receiver-path')
RST DEV('/QSYS.LIB/TAP01.DEVD') + OBJ('receiver-path')
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.
APYJRNCHG JRN(jrnlib/jrnname) + OBJPATH(/MyDirectory) + SUBTREE(*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.
APYJRNCHG JRN(jrnlib/jrnname) + OBJPATH(/MyDirectory) + SUBTREE(*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. The attached receiver at the time that the directory was 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 works correctly.
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.
APYJRNCHG JRN(jrnlib/jrnname) + OBJPATH(/MyDirectory) + RCVRNG(rcv-attached-at-save-time + ending-rcv) + FROMENT(seq#-for-save or start-of-save-entry) + TOENT(seq#-for-application-boundary)
Because the most recent save of the objects is not being used, you cannot specify FROMENT(*LASTSAVE) on the APYJRNCHG command. You must specify an individual sequence number for directory MyDirectory
Some of the APYJRNCHG commands could specify multiple objects if there is a continuous series of save or start-of-save entries in the journal. The objects identified by the continuous series of save or start-of-save journal entries could be applied to with a single APYJRNCHG command by specifying the earliest sequence number of all the save or 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.