Example: Eliminate save-outage time for libraries

This example shows a typical use of the save-while-active function to eliminate a save-outage time. Your exact use of the function may differ, based on your specific application requirements.

This example uses two libraries, LIB1, and LIB2. Both libraries contain only journaled objects and the journals for those objects. The changes made to the journaled objects may or may not be made under commitment control.

This example demonstrates a save-while-active operation that does not end the applications that are making changes to the objects in these libraries. Not ending the applications introduces additional restore considerations for the recovery operation after you restore the objects from the save-while-active media.

Eliminate the save-outage time with the following steps:

  1. Submit the following command as an individual batch job:
    SAVLIB LIB(LIB1 LIB2) DEV(TAP01) SAVACT(*SYNCLIB) +
           SAVACTWAIT(600) +
           SAVACTMSGQ(QSYSOPR) +
           ACCPTH(*YES)
     
    Note: You can also use the SAVOBJ or SAVCHGOBJ commands, depending on your specific needs.

    The server waits 10 minutes, as specified by the SAVACTWAIT parameter, to resolve each lock conflict and for any active commitment definitions to reach a commitment boundary during checkpoint processing.

    By specifying ACCPTH(*YES), you are also saving access paths for the logical files. Access paths, in most cases, will not be built after restoring the files from this save media.

    The recovery procedures needed when restoring objects from this media are dependent upon each of the database members in LIB1 and LIB2 being updated with the timestamp of this save operation.

  2. When checkpoint processing is complete, QSYSOPR receives message CPI3712 as specified by the SAVACTMSGQ parameter. Until the QSYSOPR message queue receives the CPI3712 message, monitor lock conflicts that the save-while-active job may encounter.
  3. Wait for the save-while-active job to complete.
  4. After the batch job has completed, verify that all of the required objects were saved. If lock conflicts prevented some of the objects from being saved, you should issue the original save command again after resolving any and all lock conflicts.
  5. Save the receiver containing the earliest start of save entry from each journal being used to journal the objects in libraries LIB1 and LIB2. You can get the earliest receiver from the OUTFILE on the save command. If the attached journal receivers do not reside in library LIB1 or LIB2, then you must issue separate save requests to save each of the attached receivers.
    Save all of the attached receivers with the following command. Multiple save commands may be necessary for this step.It is not necessary to use the save-while-active function when saving journal receivers. The following command defaults to SAVACT(*NO).
    SAVOBJ OBJ(attached-receiver) +
           LIB(attached-receiver-library) +
           OBJTYPE(*JRNRCV) +
           DEV(TAP01)