CL Command Reference - STRJRNPF
CL Command List > STRJRNPF Reference
Description:
The Start Journal Physical File (STRJRNPF) command is used to start journaling changes made to a specific database physical file to a specific journal. Changes in new members added to the file are also journaled.
The user can specify that only the after image or both the before and after images of records in the journaled physical file be journaled. Before images are necessary to remove journaled changes using the Remove Journaled Changes (RMVJRNCHG) command. In addition, the system will automatically capture the before images for a database file if the file is opened under commitment control.
After journaling begins for the file, and after any new members are added to the file, the user should run the Save Changed Object (SAVCHGOBJ) command with OBJTYPE(*FILE) and OBJJRN(*YES) specified. The file must be saved because journaled changes cannot be applied to a version of the file that was saved before journaling was in effect.
When the file being journaled is a distributed file, the STRJRNPF command is also distributed if journaling was successfully started locally. Even if the distribution request fails, the local file remains journaled.
For other ways to start journaling see the following commands:
. Access paths - Start Journal Access Path (STRJRNAP)
. Integrated file system objects - Start Journal (STRJRN)
. Other objects - Start Journal Object (STRJRNOBJ)
Restrictions:
. The file must not be journaling changes to another journal.
. Overrides are not applied to files specified on the FILE parameter.
. The maximum number of objects that can be associated with one journal is either 250,000 or 10,000,000. To get 10,000,000, the value of *MAX10M must have been specified for the JRNOBJLMT parameter on either the Create Journal (CRTJRN) command or on the Change Journal (CHGJRN) command. If the number of objects is larger than this maximum, journaling does not start.
. The specified journal must be a local journal. Although all object types which can be journaled to a local journal can also have their changes sent to a remote journal, this is accomplished by a two step process. First start journaling to the local journal. Then connect the local journal to a remote instance. To initiate such a connection, use the Add Remote Journal (ADDRMTJRN) command or the Add Remote Journal (QjoAddRemoteJournal) API. For information about remote journaling, see the Journal management topic.
. In multithreaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA.
. If the file has Large Object (LOB) columns, and the total of the LOB columns plus the record size is greater than 15,761,440 bytes, then the file can only be journaled to a journal with RCVSIZOPT(*MAXOPT2) or RCVSIZOPT(*MAXOPT3) specified.
Examples:
STRJRNPF FILE(MYFILE) JRN(MYLIB/JRNLA)
This command journals all changes to all members of file MYFILE (as found using the library search list) to journal JRNLA in library MYLIB. Only the after images of updated records are written to the journal.