Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Start Journal (STRJRN) command is used to start journaling changes (made to an object or list of objects) to a specific journal. The object types which are supported through this interface are Data Areas (*DTAARA), Data Queues (*DTAQ), Byte Stream Files (*STMF), Directories (*DIR), and Symbolic Links (*SYMLNK). Only objects of type *STMF, *DIR or *SYMLNK that are in the "root" (/), QOpenSys, and user-defined file systems are supported. For more information about the possible journal entries which can be sent, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
The user can specify that only the after image or both the before and the after images of an object of type *DTAARA be journaled. Before images are necessary to remove journaled changes using the Remove Journaled Changes (RMVJRNCHG) command.
After journaling begins for the object, the user should save the journaled object to preserve its journal attribute information. Also, the object must be saved because, for example, journaled changes cannot be applied to a version of the object that was saved before journaling was in effect.
For other ways to start journaling see the following commands:
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
OBJ | Objects | Values (up to 300 repetitions): Element list | Optional |
Element 1: Name | Path name | ||
Element 2: Include or omit | *INCLUDE, *OMIT | ||
OBJFID | File identifier | Values (up to 300 repetitions): Hexadecimal value | Optional |
JRN | Journal | Path name | Optional |
SUBTREE | Directory subtree | *NONE, *ALL | Optional |
PATTERN | Name pattern | Values (up to 20 repetitions): Element list | Optional |
Element 1: Pattern | Character value, * | ||
Element 2: Include or omit | *INCLUDE, *OMIT | ||
INHERIT | New objects inherit journaling | *NO, *YES | Optional |
IMAGES | Images | *AFTER, *BOTH | Optional |
OMTJRNE | Omit journal entry | *NONE, *OPNCLOSYN | Optional |
Top |
Specifies a maximum of 300 objects for which changes are to be journaled. Only objects whose path name identifies an object of type *STMF, *DIR, *SYMLNK, *DTAARA or *DTAQ are supported.
Element 1: Name
A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes. Symbolic links within the path name will not be followed. If the path name begins with the tilde character, then the path is assumed to be relative to the appropriate home directory.
Additional information about path name patterns is in the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Element 2: Include or omit
The second element specifies whether names that match the pattern should be included or omitted from the operation. Note that in determining whether a name matches a pattern, relative name patterns are always treated as relative to the current working directory.
Top |
Specifies a maximum of 300 file identifiers (FID) for which changes are to be journaled. FIDs are a unique identifier associated with integrated file system related objects. This field is input in hexadecimal format. Only objects whose FID identifies an object of type *STMF, *DIR, *SYMLNK, *DTAARA or *DTAQ are supported.
Top |
Specifies the path name of the journal that receives the journaled changes.
Top |
Specifies whether the directory subtrees are included in the start journal operation.
Note: This parameter is ignored if the OBJ parameter is not specified.
Note: This parameter is ignored unless object-path-name is a directory (*DIR) object.
Top |
Specifies a maximum of 20 patterns to be used to include or omit objects for the start journal operation. If this parameter is not specified, the default will be to match all patterns.
Only the last part of the path name will be considered for the name pattern match. Path name delimiters are not allowed in the name pattern. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes. Symbolic links within the path name will not be followed.
If this parameter is not specified, the default will be to match all patterns.
Additional information about path name patterns is in the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Note: This parameter is ignored if the OBJ parameter is not specified.
Element 1: Pattern
Element 2: Include or omit
The second element specifies whether names that match the pattern should be included or omitted from the operation. Note that in determining whether a name matches a pattern, relative name patterns are always treated as relative to the current working directory.
Note: The SUBTREE parameter specifies whether the subtrees are included or omitted.
Top |
Specifies whether new objects created within a journaled directory should inherit the journal options and the journal state of its parent directory.
Top |
Specifies the kinds of images that are written to the journal receiver for changes to objects.
Note: The value *BOTH is only valid for *DTAARA objects.
Top |
Specifies the journal entries that are omitted.
Note: The value *OPNCLOSYN is only valid for *DIR and *STMF objects.
Top |
Example 1: Start Journaling with Omit of Directory
STRJRN OBJ(('/mypath' *INCLUDE) ('/mypath/myobject' *OMIT)) JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN')
This command journals all changes to all objects supported by this command within the first-level of directory '/mypath' except '/mypath/myobject' to journal '/QSYS.LIB/MYLIB.LIB/JRNA.JRN'. None of the objects within the subdirectories of '/mypath' will be journaled.
Only the after images of updated records are written to the journal.
Example 2: Start Journaling with Pattern Matching
STRJRN OBJ(('/mypath' *INCLUDE) ('/mypath/myobject.txt' *OMIT)) JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN') SUBTREE(*ALL) PATTERN(('*.TXT' *INCLUDE)) OMTJRNE(*OPNCLOSYN)
This command journals changes to all objects that match pattern '*.txt' in directory '/mypath' except object '/mypath/myobject.txt'. The open, close and force entries are not journaled.
Only the after images of updated records are written to the journal.
Example 3: Start Journaling with Omit by Pattern
STRJRN OBJ(('/mypath/my*' *INCLUDE)) JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN') PATTERN(('*.DTA*' *OMIT))
This command journals changes to all objects within the first-level directories that match the pattern for path '/mypath/my*' and will omit all objects that match pattern '*.DTA*' (objects of type *DTAARA and *DTAQ).
Only the after images of updated records are written to the journal.
Example 4: Start Journaling using File Identifiers
STRJRN OBJFID(00000000000000007E09BDB000000009 00000000000000009E09BDB00000000A) JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN')
This command journals all changes to the objects represented by the specified file identifiers to journal '/QSYS.LIB/MYLIB.LIB/JRNLA.JRN'.
Only the after images of updated records are written to the journal.
Example 5: Start Journaling on a Set of Data Queues
STRJRN OBJ(('/QSYS.LIB/MYLIB.LIB/MYDATA*.DTAQ')) JRN('/QSYS.LIB/MYLIB.LIB/MYJRN.JRN')
This command starts the journaling of all changes to the objects of type *DTAQ in library MYLIB that begin with the characters 'MYDATA'.
Top |
*ESCAPE Messages
Top |