Command reference / db

STRJRNPF

Start Journal Physical File

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: Access paths - Start Journal Access Path (STRJRNAP) Integrated file system objects - Start Journal (STRJRN) Libraries - Start Journal Library (STRJRNLIB) Other objects - Start Journal Object (STRJRNOBJ)

Allowed environments: *ALL. Positional parameters: 2.

Restrictions

Parameters

FILE Physical file to be journaled

Specifies a maximum of 300 physical files whose changes are written to the journal. This is a required parameter.

Type
*QUAL
Required
Yes
List limit
300
Case
Uppercase
*ALL
All physical files in the specified library will have their changes written to the journal.
generic-name
Specify the generic name of the physical file for which changes are to be journaled. A generic name is a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, all physical files that have names with the same prefix as the generic name will have their changes journaled.
file-name
Specify the name of the physical file for which changes are to be journaled.
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the name of the library to be searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Physical file to be journaled Physical file to be journaled

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

JRN Journal

Specifies the journal that will receive the file change journal entries. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
journal-name
Specify the name of the journal.
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the name of the library to be searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Journal Journal

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

IMAGES Record images

Specifies the kinds of record images to be written to the journal for changes to records in the file.

Type
*CHAR
Required
No
Default
*AFTER
Length
6
Case
Uppercase

Allowed values: *AFTER, *BOTH

*AFTER
Only after images are written to the journal for changes to records in this file.
*BOTH
The system writes both before and after images to the journal for changes to records in this file.

OMTJRNE Journal entries to be omitted

Specifies the journal entries that are omitted.

Type
*CHAR
Required
No
Default
*NONE
Length
7
Case
Uppercase

Allowed values: *NONE, *OPNCLO

*NONE
No journal entries are omitted.
*OPNCLO
Open and close entries are omitted. Open and close operations on the specified file members do not create open and close journal entries. This prevents the use of TOJOBO and TOJOBC entries on the Apply Journaled Changes (APYJRNCHG) and Remove Journaled Changes (RMVJRNCHG) commands, but it saves some storage space in the attached receivers.

LOGLVL Logging level

Specifies the error logging level used. This parameter is used to determine which messages will be sent.

Type
*CHAR
Required
No
Default
*ERRORS
Length
7
Case
Uppercase

Allowed values: *ERRORS, *ALL

*ERRORS
All diagnostic and escape messages are sent but the command will not send successful completion messages for each object. At the completion of this command, one completion message will be sent.
*ALL
The command sends all the messages that would be sent with *ERRORS and it will also send the successful completion message for each object.

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.

IBM command documentation

Generated from os/cl/catalog/STRJRNPF.json and os/cl/help/STRJRNPF.json.