Example: Eliminate save-outage time for a directory

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

This example uses the directory, MyDirectory. MyDirectory contains only journaled objects.

This example demonstrates a save-while-active operation that does not end the applications that are making changes to the objects in this directory. 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:
    SAV DEV('/QSYS.LIB/TAP01.DEVD')  +
        OBJ('/MyDirectory') UPDHST (*YES) SAVACT(*SYNC) +
    	 SAVACTMSGQ(QSYS.LIB/LIB1.LIB/MSGQ1.MSGQ) +
  2. When checkpoint processing is complete for the directory, the message queue receives the message CPI3712, as specified by the SAVACTMSGQ parameter. Until the message queue, MSQ1, 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 attached receiver of each journal being used to journal the objects in directory MyDirectory.
    Save all of the attached receivers with a command such as the one below. 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).
    SAV DEV('/QSYS.LIB/TAP01.DEVD')  +
    		  OBJ('/QSYS.LIB/MYLIB.LIB/JRNR*.JRNRCV')