Applying journaled changes

With this synchronization method, you use system journaling capabilities to synchronize the information in journaled objects on your test and existing systems.

The applying journaled changes method is most commonly used either by installations that already use and understand journaling or by installations that have very large journaled objects.

The advantage of this method is that you save and restore only the changes that occur to a journaled object, not the entire object. The disadvantage of this method is its complexity.

Journaling before saving

You must set up journaling on your existing system before you perform the save operation from which you build your new systems. When you start journaling for an object, the system assigns a journal ID number (JID) to that object. An object must have a JID before you save it from your existing system and restore it to your new system or you will not be able to apply journaled changes to the test version.

Conceptually, when you use journaling to synchronize objects, you perform the following steps to establish a synchronization point:

  1. On your existing system, follow these steps:
    1. Save security data to get a current copy of user profiles and private authorities.
    2. Save new journal receivers (that contain entries that you have not yet applied on your new system).
    3. Save any new objects (that do not yet exist on your new system).
  2. On your new system, follow these steps:
    1. Restore user profiles (to get any new profiles and current authority information).
    2. Restore any new objects.
    3. Restore journal receivers.
    4. Apply journaled changes from the journal receivers.
    5. Restore authority to any new objects.

Here is an example of the steps for using journaled changes to synchronize systems:

  1. To establish a checkpoint on your existing system, follow these steps:
    1. Use the Work with Journal Attributes (WRKJRNA) command to determine what journal receivers have been created since your last checkpoint.
    2. Write down the names of the new journal receivers.
    3. Determine whether any files, data areas, data queues, or libraries have been added to any journaled objects since your last checkpoint.
      You can use the Display Journal (DSPJRN) command to do this by typing the following command:
      
      DSPJRN JRN(journal-name) JRNCDE((D) (E) (Q) (Y)) ENTTYP(JF EG QB YB)
             RCVRNG(first-receiver *CURRENT)

      For first-receiver, use the name of the first receiver after the most recent checkpoint.

      Note: If you are journaling integrated file system objects, and your directories are not using the inherit journaling attribute, look for new integrated file system objects by adding B to the JRNCDE parameter, and JT to the ENTTYP parameter.
    4. Write the new object names on a list. (You will need to save them later.)
    5. If you have other journals on your system, repeat step 1a through step 1c for each additional journal.
    6. For each journal on your system, use the Change Journal (CHGJRN) command to detach the current journal receivers and attach new journal receivers.
    7. Use the Save Object (SAVOBJ) command or Save Object (SAV) command to save any newly journaled objects that you listed in step 1d and step 1c.
      Use the Save Library (SAVLIB) command to save journaled libraries that you listed in step 1d.
      Note: The system needs an exclusive lock on an object to save it. You might need to stop certain application activity on your system to be able to save the newly journaled objects.
    8. Use the SAVOBJ command to save the journal receivers that you listed in step 1b.
    9. If you do not have a current copy of your user profiles on tape, use the Save Security Data (SAVSECDTA) command to save them to tape.
    10. You have completed establishing a new checkpoint (such as Point 2) on your existing system.
  2. To synchronize the journaled objects on your new system with the existing versions, follow these steps:
    1. Place your new system in a restricted state.
    2. On the new system, use the Restore User Profiles (RSTUSRPRF) command:
      
      RSTUSRPRF USRPRF(*ALL) DEV(tape-device)
          ENDOPT(*LEAVE)
    3. Use the Restore Object (RSTOBJ) or Restore Object (RST) command to restore any objects that you saved in step 1g.
    4. Use the RSTOBJ command to restore the journal receivers that you saved in step 1h.
    5. Use the Apply Journaled Changes (APYJRNCHG) command to bring your journaled objects to the checkpoint level:
      • For the starting receiver, specify the journal receiver that was created and attached when you established your most recent checkpoint on the existing system. For the ending receiver, specify *CURRENT.
      • For the starting sequence number, specify *FIRST.
      • For the ending sequence number, specify *LAST.

      See the Journal management topic to understand what journal entries might either be skipped or might stop the apply process.

    6. Use the Restore Authority (RSTAUT) command to restore private authorities for any new objects that you restored.
    7. Restart the controlling subsystem on your new system.