Example: Reduce save-outage time for a directory

This example uses a directory, MyDirectory. The directory contains objects that you will save on a daily basis. Your current save strategy ends jobs that make changes to the objects in the directory for the entire time that the you are saving the directory.

The objects that exist in the directory may or may not be journaled.

The several hour save-outage time can be greatly reduced by the following steps:

  1. End all application jobs that are making updates to the objects in MyDirectory.
  2. Submit the following command as an individual batch job:
    SAV DEV('/QSYS.LIB/TAP01.DEVD')  +
        OBJ('/MyDirectory') SAVACT(*SYNC) +
    	 SAVACTMSGQ(QSYS.LIB/LIB1.LIB/MSGQ1.MSGQ)
          

    The objects in directory MyDirectory reach a checkpoint together, as specified by SAVACT(*SYNC). The server saves the objects TAP01. The server sends the message indicating that checkpoint processing is complete to MSGQ1

  3. After checkpoint processing is complete, the message queue receives the message CPI3712. If checkpoint processing does not complete for the objects, message queue receives the message CPI3722 and the save operation ends.
  4. After receiving CPI3712 message, start the application jobs that make updates to the objects in the directory.

The objects exist on the media as they were at the time the application jobs were ended, prior to the save command being run. The save-while-active function greatly reduces the amount of time that the applications are not available.