Using save-while-active to synchronize the saved data

To fully synchronize the checkpointed data for multiple save operations, use the Start Save Synchronization (STRSAVSYNC) command to specify the number of save operations that you want to synchronize. Then start each save operation, specifying full synchronization for each operation. Multiple save operations are run concurrently in different jobs.

About this task

You can synchronize any combination of Save Object (SAV), Save Library (SAVLIB), Save Object (SAVOBJ), or Save Changed Object (SAVCHGOBJ) commands. For example, you might specify the following commands: STRSAVSYNC, SAV, and SAVLIB. To synchronize multiple save operations for directories and libraries, complete the following steps:

Procedure

  1. Issue the STRSAVSYNC command to start the save-while-active action.
  2. Issue the Save Object (SAV) command for each session to save the directories.
    The system responds by displaying message CPI373F, Waiting for all SYNCID &1 operations to start. The system is waiting for the other save operations to start.
  3. Issue the Save Library (SAVLIB) commands for each session to save the libraries.
    The system responds by displaying message CPI373F, Waiting for all SYNCID &1 operations to start.
  4. The system processes the checkpoints for each of the save operations.

    The system responds with a Checkpoint reached message to the save-while-active message queue (SAVACTMSGQ). You might also receive checkpoint progress messages before reaching the Checkpoint reached message.

    The system saves the data for each of the specified directories and libraries.

    The system issues a completion message for each of the specified save operations.

Results

You can also synchronize multiple save operations in batch mode, or synchronize save operations for two different libraries that are journaled to the same journal.

Example

Example: Save-while-active cross-file-system synchronization in batch mode

This example shows a way to synchronize the checkpointed data when saving a library and directory. The STRSAVSYNC command starts a synchronized checkpoint named SYNCMYDATA for two save-while-active operations. The two participating save operations are submitted for batch processing. The first save-while-active operation saves the MYLIB library to the TAP01 device, and the second one saves the MYDIR directory to the TAP02 device. Each participating save operation specifies the SAVACT value for full synchronization of the data that it saves, and the synchronization ID, SYNCMYDATA.

STRSAVSYNC  SYNCID(SYNCMYDATA)  NUMSYNC(2) 
SBMJOB      CMD(SAVLIB  LIB(MYLIB)  DEV(TAP01)
            SAVACT(*SYNCLIB)  SYNCID(SYNCMYDATA))
SBMJOB      CMD(SAV  DEV('/QSYS.LIB/TAP02.DEVD')  OBJ(('/MYDIR'))
            SAVACT(*SYNC)  SYNCID(SYNCMYDATA))
Start of change

What to do next

The following is a list of the errors that you might encounter during the save-while-active processing. You can use the command End Save Synchronization (ENDSAVSYNC) command to end an active synchronized checkpoint and any participating save while active operations that have not yet reached the checkpoint.
Error message Cause Action
CPF37BC, Synchronization ID &1 ended. Wait time exceeded. One or more save jobs fail to start within the wait time (STRSAVWAIT) specified on the STRSAVSYNC command. Reissue the STRSAVSYNC command using a larger wait time value (STRSAVWAIT) and the save commands.
CPF37BB, Synchronization ID &1 already started STRSAVSYNC specifies an existing synchronization ID. Reissue the STRSAVSYNC command using a unique synchronization ID (SYNCID).
CPF37BE, Synchronization ID &1 not started The system attempts to synchronize the save jobs but the user did not issue the STRSAVSYNC command. Issue the STRSAVSYNC command, and then issue the SAV or SAVLIB commands.
CPF37B9, Synchronization ID &1 in use The system attempted to start more save job operations with the same SYNCID value. Reissue the STRSAVSYNC command using the correct number of save jobs to synchronize (NUMSYNC). For example, if you need five save jobs, but specified only 4 in the STRSAVSYNC command, you need to do the following: Start of change
  1. Use the ENDSAVSYNC command to end the other four save jobs that already started.
  2. Prepare the media.
  3. Reissue the STRSAVSYNC command.
  4. Reissue the save commands.
End of change
End of change