Example: Reducing save-outage time for two libraries
This example makes use of two libraries, LIB1 and LIB2. Both libraries contain objects that you will save on a daily basis.
Your current save strategy ends jobs that make changes to the objects in the two libraries for the entire time that the you are saving the libraries.
For this example, objects of any type can exist in the two libraries. The objects that exist in the two libraries may or may not be journaled.
The several hour save-outage time can be greatly reduced by the following steps:
- End all application jobs that are making updates to the objects in libraries LIB1 and LIB2.
- Submit the following command as an individual batch job:
SAVLIB LIB(LIB1 LIB2) DEV(TAP01) SAVACT(*SYNCLIB) + SAVACTMSGQ(QSYSOPR) + ACCPTH(*YES)You could also use the SAVOBJ or SAVCHGOBJ commands depending on your specific needs.
The objects in library LIB1 and LIB2 reach a checkpoint together, as specified by SAVACT(*SYNCLIB), and the system saves the libraries to TAP01. The system sends the message indicating that checkpoint processing is complete to QSYSOPR.
You are also saving access paths for the logical files, as specified by ACCPTH(*YES). If you specify this, the access paths, in most cases, will not need to be built after restoring the files from this save media.
A single save command saves the libraries to provide a consistent checkpoint. This is also faster than saving both libraries to the same storage device with separate commands. Using two save commands to two separate media devices allows the system to perform the checkpoint processing for the libraries concurrently. It may also allow the system to perform checkpoint processing faster than saving both libraries with a single save command.
- After checkpoint processing is complete, the message queue QSYSOPR receives the message CPI3712. If checkpoint processing does not complete for the objects, message queue receives the message CPI3711 and the save operation ends.
- After receiving CPI3712 message, start the application jobs that make updates to the objects in the two libraries.
The objects exist on the media as they were at the time the application jobs were ended, prior to the save command being run. However, the save-while-active function greatly reduces the amount of time that the applications are not available.
Parent topic:
Reducing your save-outage time