Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
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. For more information about commitment control, see the Database category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
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:
Restrictions:
The physical file to start journaling is locked with a read exclusive lock (*EXCLRD). Any logical files built over the physical file are also locked with a read exclusive lock (*EXCLRD).
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | Physical file to be journaled | Values (up to 300 repetitions): Qualified object name | Required, Positional 1 |
Qualifier 1: Physical file to be journaled | Generic name, name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
JRN | Journal | Qualified object name | Required, Positional 2 |
Qualifier 1: Journal | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
IMAGES | Record images | *AFTER, *BOTH | Optional |
OMTJRNE | Journal entries to be omitted | *NONE, *OPNCLO | Optional |
LOGLVL | Logging level | *ERRORS, *ALL | Optional |
Top |
Specifies a maximum of 300 physical files whose changes are written to the journal.
This is a required parameter.
Qualifier 1: Physical file to be journaled
Qualifier 2: Library
Top |
Specifies the journal that will receive the file change journal entries.
This is a required parameter.
Qualifier 1: Journal
Qualifier 2: Library
Top |
Specifies the kinds of record images to be written to the journal for changes to records in the file.
Top |
Specifies the journal entries that are omitted.
Top |
Specifies the error logging level used. This parameter is used to determine which messages will be sent.
Top |
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.
Top |
*ESCAPE Messages
Top |