Starting or ending journaling for libraries

You can journal a library or a list of libraries and, optionally, journal database files that are created, moved, or restored into the library or the list of libraries.

The following libraries cannot be journaled, where xxxxx is a 5-digit number and yyyy is a 4-digit number:
  • QGPL
  • QRCL
  • QRCLxxxxx
  • QRCYxxxxx
  • QRECOVERY
  • QRPLOBJ
  • QRPLxxxxx
  • QSPL
  • QSPLyyyy
  • QSYS
  • QSYSxxxxx
  • QSYS2
  • QSYS2xxxxx
  • QTEMP
  • SYSIBxxxxx
  • SYSIBM
  • SYSIBMADM
  • SYSPROC
  • SYSTOOLS

To start journaling changes to a library, use the Start Journal Library (STRJRNLIB) command. When the STRJRNLIB command is used, the library must exist and you must have the appropriate authority to the journal. Authority to the journal is not required later when files are implicitly journaled.

When you start journaling changes to a library by using the STRJRNLIB command, you can specify whether database files that are created, moved, or restored into the library should inherit the journaling state of the library and which journaling attributes they should have. Based on the inheritance rules that you defined using the INHRULES parameter, files that are created, moved, or restored into the journaled library can automatically start journaling to the same journal as the library.

Journal entries for libraries and for files that were created, moved, or restored into the libraries and that started journaling because of the library journaling inheritance can be applied by the Apply Journaled Changes (APYJRNCHG) command or the Apply Journaled Changes Extend (APYJRNCHGX) command.

Note: If a journaled library contains a data area named QDFTJRN, no files that are created, moved, or restored into the library can inherit the journaling state of the library. Instead, files that are created, moved, or restored into the library automatically start journaling based on the rules defined in the QDFTJRN data area.

To end journaling changes to a library, use the End Journal Library (ENDJRNLIB) command. When journaling is ended, the inheritance rules that were previously defined for the library are not deleted.