Replay Journal Entry (QjoReplayJournalEntry) API


  Required Parameter Group:


  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:


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:

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.



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.



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.

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



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:

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:


Error Messages




API introduced: V6R1

[ Back to top | Journal and Commit APIs | APIs by category ]