Journal Inherit Rules

The journal inherit rules format is common across several application programming interfaces (APIs) that work with journaled objects. These APIs have the journal inherit rules as input or output depending on the API.

The structures defined below are in the QJOJRNENT QSYSINC include file.

For more information about the journal inherit rules, see the Journal management topic collection.

The format of the journal inherit rules is as follows. For a detailed description of each field, see Field descriptions.

Inherit Rules Description (Qjo_Inherit_Rules_t)

Offset Type Field
Dec Hex
0 0 BINARY(4), UNSIGNED Version
4 4 BINARY(4), UNSIGNED Displacement to first inherit rule entry
8 8 BINARY(4), UNSIGNED Total length of inherit rules
12 C BINARY(4), UNSIGNED Number of inherit rules
16 10 CHAR(1) Inherit rules overridden
17 11 CHAR(3) Reserved
Offset determined from Displacement to first inherit rule entry field Qjo_Inherit_Rules_entry_t Structure Inherit Rules Entry Structure. See Inherit Rules Entry Description for a description of this structure.


Inherit Rules Entry Description (Qjo_Inherit_Rules_Entry_t)

Offset Type Field
Dec Hex
0 0 BINARY(4), UNSIGNED Displacement to next inherit rule
Start of change4 4 CHAR(10) Name filter
14 E CHAR(10) Reserved End of change
24 18 CHAR(10) Object type
34 22 CHAR(1) Operation
35 23 CHAR(1) Rule action
36 24 CHAR(1) Images
37 25 CHAR(1) Omit journal entry
Start of change38 26 CHAR(1) Remote journal filter
39 27 CHAR(1) Reserved End of change


Field descriptions

This section describes the journal inherit rules format fields in further detail. Field descriptions are in alphabetical order.

Displacement to first inherit rule entry. The displacement in bytes to the first inherit rule entry from the beginning of the inherit rules header.

Displacement to next inherit rule entry. The displacement in bytes to the next inherit rule entry from the beginning of this inherit rule entry. This value will be zero for the last inherit rule.

Images. The kinds of journal images that are written to the journal receiver for changes to objects that inherit the journal options and journal state from the parent directory or library.

Note: This field is ignored if QJO_INHRULES_RULEACTION_OMIT is specified for Rule action.

Possible values are:

'0' QJO_INHRULES_IMAGES_OBJDFT: The default value for each object type will be used for this journal option when an object inherits the journaling attributes from the library. Database files (*FILE) will have both before and after images generated by the system (QJO_INHRULES_IMAGES_BOTH). All other object types will have only after images generated by the system (QJO_INHRULES_IMAGES_AFTER).
'1' QJO_INHRULES_IMAGES_AFTER: Only after images are journaled for an object for which journaling is started because it inherits the journaling attributes from the library.
'2' QJO_INHRULES_IMAGES_BOTH: Both before and after images are journaled for an object for which journaling is started because it inherits the journal option from the library. This value is only valid for data area (*DTAARA) and database file (*FILE) objects. If this value is specified and *ALL is specified for Object type, the system will generate both before and after images for data areas and database files and the system will only generate after images for all other object types.

Inherit rules overridden. If the associated object is a library, this indicates whether or not a QDFTJRN data area which exists will override the library's journal inherit rules. That is, the information in the QDFTJRN data area takes precedence over the journal inherit rules displayed for this library.

For more information about QDFTJRN, see Automatically start journaling in the Journal management topic collection.

'0' QJO_INHERIT_RULES_OVERRIDDEN_NO: The object is not a library, or the QDFTJRN data area does not exist.
'1' QJO_INHERIT_RULES_OVERRIDDEN_YES: The object is a library and the QDFTJRN data area does exist.

Start of change Name filter. If the Version field is 2 or greater, this field specifies the object names of the objects that are identified by this rule. Otherwise this field will be set to hexadecimal zeros.

Possible values are:

*ALL QJO_INHRULES_NAMEFILTER_ALL: This rule applies to all objects that match the other criteria.
name This rule applies to all objects that match the other criteria and match the specified name.
generic-name This rule applies to all objects that match the other criteria and match the specified generic name.

Note: A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, then all objects that have names with the same prefix as the generic object name are selected.

End of change

Number of inherit rules. The number of inherit rules described by the repeating inherit rule entries. The possible values are 1 through 20.

Object type. Specifies the object type of the objects that are identified by this rule.

Possible values are:

*ALL This rule applies to all object types that can be journaled.
*DTAARA This rule applies to data areas.
*DTAQ This rule applies to data queues.
*FILE This rule applies to database physical files.

Omit journal entry. The journal entries that are not to be written for changes to objects that inherit the journaling options and state of the library.

Note: This field is ignored if QJO_INHRULES_RULEACTION_OMIT is specified for Rule action.

Possible values are:

'0' QJO_INHRULES_OMTJRNE_OBJDFT: The default value for each object type will be used for this journal option when an object inherits the journal options and journal state from the parent directory or library. Open and close entries will be omitted for database files (*FILE). No other object types will omit journal entries
'1' QJO_INHRULES_OMTJRNE_NONE: No journal entries will be omitted for objects that inherit the journal options and journal state from the parent directory or library.
'2' QJO_INHRULES_OMTJRNE_OPNCLO: Open and close entries are omitted for database file (*FILE) objects that inherit the journal options and journal state from the library.

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 journal receivers.

This value is only valid for object type *FILE. If this value is specified and *ALL is specified for Object type, database files will omit the entries. All other object types will not omit any journal entries.

Operation. The operations performed on the object type for which journaling is to be started if other criteria specified for the object type are also satisfied. Possible values are:

'0' QJO_INHRULES_OPERATION_ALLOPR: Journaling is started for all objects created in, moved into, or restored into the library. This is a combination of the values QJO_INHRULES_OPERATION_CREATE, QJO_INHRULES_OPERATION_MOVE and QJO_INHRULES_OPERATION_RESTORE. See their descriptions for further information.
'1' QJO_INHRULES_OPERATION_CREATE: Journaling is started for all objects created in the library.
'2' QJO_INHRULES_OPERATION_MOVE: Journaling is started for all objects moved into the library, if they aren't already journaled.
'3' QJO_INHRULES_OPERATION_RESTORE: If an object is restored over a currently existing object, the restored object will retain the same journal options and journal state of the object it was restored over. If an object was never journaled when it was saved, journaling is started for the object when it is restored into the library. If an object was journaled when it was saved, it will first attempt to start journaling to the journal it was journaled to when it was saved, with the same journal options it had when it was saved. If that journal does not exist, the object will start journaling to the same journal the library is journaled to, with the journal options defined by this rule.
'4' QJO_INHRULES_OPERATION_RSTOVRJRN: If an object is restored over a currently existing object, the restored object will retain the same journal options and journal state of the object it was restored over. Otherwise, journaling is started for all objects restored into the library, regardless of the journal options and journal state of the object when it was saved.

Start of change Remote journal filter. If the Version field is 2 or greater, this field specifies whether or not the journal entries written for the objects that inherit the journal state of the library should be eligible for remote journal filtering by object. Otherwise this field will be set to hexadecimal zero.

See the Change Remote Journal (CHGRMTJRN) command or the Change Journal State (QjoChangeJournalState) API for more information about remote journal filtering.

Note: This field is ignored if QJO_INHRULES_RULEACTION_OMIT is specified for Rule action.

Possible values are:

'0' QJO_INHRULES_RMTJRNFTR_OBJDFT: The default value for each object type will be used for this journaling attribute when an object inherits the journal state of the library. For all object types, journal entries deposited for the objects that inherit the journal state of the library will not be eligible for remote journal filtering by object (QJO_INHRULES_RMTJRNFTR_NO).
'1' QJO_INHRULES_RMTJRNFTR_NO: Journal entries deposited for the objects that inherit the journal state of the library will not be eligible for remote journal filtering by object.
'2' QJO_INHRULES_RMTJRNFTR_YES: Journal entries deposited for the objects that inherit the journal state of the library will be eligible for remote journal filtering by object. When using remote journal filtering by object, most journal entries for the object will not be sent to the target system.
End of change

Reserved. A reserved field. This field will be set to hexadecimal zero.

Rule action. Indicates whether or not the objects that match the object type and operation in this rule will be included or omitted from the list of objects that inherit the journal options and journal state of the library. Possible values are:

'0' QJO_INHRULES_RULEACTION_INCLUDE: All objects that match the object type and operation of this rule will inherit the journal options and journal state of the library.
'1' QJO_INHRULES_RULEACTION_OMIT: All objects that match the object type and operation of this rule will not inherit any journaling attributes or state from the parent directory or library. This overrides an QJO_INHRULES_RULEACTION_INCLUDE rule and therefore can be used to omit a subset of a previously defined QJO_INHRULES_RULEACTION_INCLUDE rule.

Total length of inherit rules. The total size in bytes of this entire journal inherit rules structure including all inherit rules entries.

Version. The version number of this structure. Possible values are:

1 QJO_INHRULES_VERSION_1: This is the first release of this structure starting in V6R1.
2 Start of changeQJO_INHRULES_VERSION_2: This is the second release of this structure starting in IBM® i 7.1. End of change