Replay Journal Entry (QjoReplayJournalEntry) API
Required Parameter Group:
1 | Input template | Input | Char(*) |
2 | Length of input template | Input | Binary(4) |
3 | Input template format name | Input | Char(8) |
4 | Journal entry specific data | Input | Char(*) |
5 | Length of journal entry specific data | Input | Binary(4) |
6 | Rename exit program scratchpad | Input | Char(*) |
7 | Error code | I/O | Char(*) |
Service Program Name: QJOURNAL
Header File Name: QSYSINC/H.QJOURNAL
Default Public Authority: *USE
Threadsafe: No
The Replay Journal Entry (QjoReplayJournalEntry) API replays a single journal entry.
Only certain journal entries are supported. If a journal entry is passed that is not supported, the operation will fail. The following journal entries are supported:
Journal Code | Entry Type | Description | |
---|---|---|---|
E | EE | Create data area | |
Q | QA | Create data queue | |
Note: The following entries require format JORR0200. | |||
Q | QL | Receive data queue entry, has key | |
Q | QR | Receive data queue entry, no key |
Authorities and Locks
- Object Library Authority
-
*EXECUTE
-
Note: Additionally, the same authority is necessary as the original operation. For example, if the journal entry is Create data area, *ADD is required.
- Object Authorities
-
The same authority is necessary as was required for the original operation.
- Object Lock
-
The same locks are necessary as were required during the original operation.
- Rename Exit Program Library Authority
-
*EXECUTE
- Rename Exit Program Authority
-
*EXECUTE
Required Parameter Group
- Input template
- INPUT;CHAR(*)
A structure that contains the input options used to replay the operation from the journal entry. For the format of this parameter, see JORR0100 Format or JORR0200 Format.
- Length of input template
- INPUT; BINARY(4)
A variable that contains the length of the input template. The length must be greater than zero and large enough to contain all the template fields. For the JORR0100 format this must be up to and including the Rename exit program library name field. For the JORR0200 format this must be up to and including the Object type field. The length must not be larger than 32767.
- Input template format name
- INPUT; CHAR(8)
The format of the input template being used. The possible value is:
JORR0100 Basic template JORR0200 Extended template For more information, see JORR0100 Format and JORR0200 Format.
- Journal entry specific data
- INPUT;CHAR(*)
The entry specific data from a journal entry.
See the Journal management topic collection for information about entry specific data.
- Length of journal entry specific data
-
INPUT;BINARY(4)
The length of the entry specific data from a journal entry. The length must be greater than zero and must be the length of the actual entry specific data provided when the journal entry was originally written. The length must not be larger than 16 773 120.
- Rename exit program scratchpad
-
INPUT; CHAR(*)
An area which is passed to the rename exit program. The area can contain any information that the caller of the API wishes to pass on to the rename exit program. A rename exit program scratchpad must be passed even if the rename exit program is not specified.
- Error code
-
I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
JORR0100 Format
The following table shows the format of the input template parameter for the JORR0100 format. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(1) | Journal code |
1 | 1 | CHAR(2) | Entry type |
3 | 3 | CHAR(10) | Rename exit program name |
13 | D | CHAR(10) | Rename exit program library name |
23 | 17 | CHAR(*) | Reserved |
JORR0200 Format
The following table shows the format of the input template parameter for the JORR0200 format. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(1) | Journal code |
1 | 1 | CHAR(2) | Entry type |
3 | 3 | CHAR(10) | Rename exit program name |
13 | D | CHAR(10) | Rename exit program library name |
23 | 17 | CHAR(10) | Object name |
33 | 21 | CHAR(10) | Object library name |
43 | 2B | CHAR(10) | Object type |
53 | 35 | CHAR(*) | Reserved |
Field Descriptions
Entry type. The journal entry type from the journal entry of the operation to replay. See the Journal management topic collection for more information about entry type.
Journal code. The journal code from the journal entry of the operation to replay. See the Journal management topic collection for more information about journal codes.
- E
- Data area operation.
- Q
- Data queue operation.
Object library name. The library name of the object for which the journal entry is to be replayed.
Object name. The name of the object for which the journal entry is to be replayed.
Object type. The type object for which the journal entry is to be replayed.
*DTAQ | The object is a data queue (*DTAQ). |
*DTAARA | The object is a data area (*DTAARA). |
Rename exit program name. The name of the rename exit program.
- *NONE
- A rename exit program is not provided. The names of any objects referenced during the replay of the operation will be the same as the object names that were referenced when the journal entry was originally written to the journal.
- program-name
- The name of the program to call which may provide a different name for any object referenced in the journal entry. When a rename exit program is specified, each name referenced during the replay of the operation will be passed to the rename exit program. The same name may be passed to the exit program more than once if it is referenced in the internal journal entry specific data more than once. If the names are changed by the rename exit program, the names are case sensitive and must conform to any IBM® i rules for object names.
Two parameters are passed to the rename exit program. The first parameter is the Rename Exit Program Parameter Template. The second parameter is the Rename Exit Program Scratchpad. For more information, see Rename Exit Program Parameter. The exit program may inspect the name passed and leave the name as is, or it may change the name in the Rename Exit Program Parameter to an alternate name.
If the rename exit program returns an exception, the replay operation will fail.
Rename exit program library name. The library that contains the rename exit program, if any. The rename exit program library name must be blank if the value of the rename exit program name is *NONE.
- library-name
- The library name of the rename exit program.
Reserved. A reserved field. It must contain hexadecimal zeroes.
Rename Exit Program Parameter
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Length of rename exit program parameter |
4 | 4 | BINARY(4) | Length of object name |
8 | 8 | BINARY(4) | Length of object library |
12 | C | BINARY(4) | Object type |
16 | 10 | CHAR(258) | Object name |
274 | 112 | CHAR(258) | Object library name |
538 | 21A | CHAR(*) | Reserved |
Field Descriptions
Length of object library name. The length of the library name of the referenced object. If the rename exit program modifies this length, it must be greater than zero and not greater than 10. It must reflect the number of characters in the new object library name.
Length of object name. The length of the name of the referenced object. If the rename exit program modifies this length, it must be greater than zero and not greater than 10, and must reflect the number of bytes in the new object name.
Length of rename exit program parameter. The length of the structure passed to the rename exit program. The rename exit program must not modify this value.
Object library name. The library name of the referenced object. If the rename exit program modifies the library name, it must be a valid library name.
- library-name
- The library name of the referenced object.
Object name. The name of the referenced object. If the rename exit program modifies the object name, it must be a valid object name.
- object-name
- The name of the referenced object. The name must be a 10 character object name.
Object type. The type of the referenced object. The following values may be passed to the exit program for the object type:
101 | The object is a data area (*DTAARA). |
102 | The object is a data queue (*DTAQ). |
The rename exit program must not modify this value.
Reserved. A reserved field. The rename exit program must not modify this value.
Usage Notes
If a data area or data queue is created as a result of replaying a Create data area (E EE) or Create data queue (Q QA) entry:
- If the object was originally created on a V6R1M0 or later system and journaling was automatically started when the object was created, the replay operation will also automatically start journaling to the same journal. Otherwise the object will not automatically start journaling.
- If the object was originally created on a V6R1M0 or later system and journaling was automatically started when the object was created, the journal identifier for the created object will be the same as the journal identifier of the object when it was originally created. Otherwise the journal identifier will not be preserved.
- The resulting authority on the original create will be granted when the object is created during the replay processing.
Error Messages
Message ID | Error Message Text |
---|---|
CPF019D E | Value &1 not valid as sytem name. |
CPF1000 E | All CPF10xx messages could be returned. xx is from 01 to FF. |
CPF2100 E | All CPF21xx messages could be returned. xx is from 01 to FF. |
CPF2283 E | Authorization list &1 does not exist. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C31 E | Object type &1 is not valid. |
CPF3C39 E | Value for reserved field not valid. |
CPF3C3C E | Value for parameter &1 not valid. |
CPF3CF1 E | Error code parameter not valid. |
CPF6565 E | User profile storage limit exceeded. |
CPF6941 E | Replay of journal entry failed, reason code &4. |
CPF7003 E | Entry not journaled to journal &1. Reason code &3. |
CPF70C2 E | Value returned from the rename exit program is not valid. |
CPF9500 E | All CPF95xx messages could be signaled. xx is from 01 to FF. |
CPF9800 E | All CPF98xx messages could be signaled. xx is from 01 to FF. |
API introduced: V6R1
[ Back to top | Journal and Commit APIs | APIs by category ]