RTVJRNE (Retrieve Journal Entry)

RTVJRNE Command syntax diagram

 

Purpose

The Retrieve Journal Entry (RTVJRNE) command is used in a CL program or REXX procedure to retrieve a journal entry and place the results in CL variables. The CL variables contain information, such as the sequence number of the retrieved entry, and are useful in automating certain types of recovery functions. The search for a journal entry can be restricted to an object, to a range of journal receivers, to a range of journal entries, to a journal code, to an entry type, to a job, to a program, to a user profile, or to a commit cycle identifier. Multiple limitation criteria can be specified. If more than one journal entry satisfies the search values specified, the first occurrence of a journal entry satisfying all of the specified search values is returned. If there is no journal entry satisfying the search values specified, the command ends with an escape message, and the return CL variables (RTNSEQNBR, RTNJRNCDE, RTNENTTYP, RTNRCV, RTNRCVLIB and RTNJRNE) remain the same.

The order of the search through the journal entries can be ascending or descending. The search order is determined by the value specified in the SEARCH parameter. The value for the FROM parameter must come before the value specified for the TO parameter in the specified search order.

The CL prompt for this command lists the minimum length for retrieved variables next to the correct parameters. For character variables, a single number is shown. For decimal variables, two numbers are shown. The first number indicates the minimum variable length, and the second number indicates the minimum number of decimal positions.

 

Restrictions

  1. If the sequence number is reset in the range of receivers specified, the first occurrence of either the FROMENT or TOENT parameter is used, if they are specified.
  2. The FILE, JRNCDE, ENTTYP, JOB, PGM, USRPRF, CMTCYCID, and DEPENT parameters can be used to specify a subset of all available entries within a range of journal entries.

    • If no values are specified using these parameters, all available journal entries are retrieved.
    • If more than one of these parameters are specified, then a journal entry must satisfy all of the values specified on these parameters, except when *IGNFILSLT is specified on the JRNCDE parameter.
    • If a journal code is specified on the JRNCDE parameter and *IGNFILSLT is specified for that journal code, then journal entries with the specified journal code are selected if they satisfy all selection criteria except what is specified on the FILE parameter.


  3. The JOB, PGM, and USRPRF parameters cannot be used to specify selection criteria if one or more journal receivers in the specified receiver range was attached to a journal that had a RCVSIZOPT or FIXLENDTA option specified that omitted the collection of that data. >
  4. If more than the maximum number of objects is identified (32,767 objects), an error occurs and no entries are retrieved. This restriction is ignored if *ALLFILE is specified.

 

Required Parameters

JRN
Specifies the qualified name of the journal from which the journal entry is retrieved.

The name of the journal can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

journal-name: Specify the name of the journal from which the journal entry is retrieved.

 

Optional Parameters

FILE
Specifies a maximum of 300 qualified file names whose journal entries are retrieved. This parameter also specifies the name of the file member whose journal entries are to be retrieved.

To determine which journal entries are to be retrieved, based on the specified file member name, the following is done:

  • If the journal is a local journal, and if the specified file member currently exists on the system, the journal identifier is determined from the specified file member. All journal entries in the specified receiver range for that journal identifier are retrieved.
  • If the journal is a remote journal, or if the specified file member does not currently exist on the system, the specified receiver range is searched to determine all possible journal identifiers that are associated with the specified file member. All journal entries in the specified receiver range for those journal identifiers are retrieved.

    There can be more than one journal identifier associated with the specified file member if, for example, a file member was created by that name, it was journaled, and then deleted. Then another file member was created with the same name, and it was also journaled and then deleted. All of these actions would have to occur within the specified receiver range.

 

Notes

  1. The journal identifier is the unique identifier associated with the object when journaling is started for that object. The journal identifier stays constant, even if the object is renamed, moved, or restored. See the Journal management article in the Information Center for more information.
  2. When specifying a database file on this parameter, journal entries with the following journal code values are retrieved only if they satisfy the values specified on the other parameters:

    • Journal code D (database file-level information entries).
    • Journal code F (file member-level information entries).
    • Journal code R (record-level information entries).
    • Journal code U (user-generated entries).
    • Other journal codes, if *IGNFILSLT is specified on that journal code. If *ALLSLT is specified on that journal code, no journal entries with that code are retrieved.

The single value *ALLFILE can be specified on the list of two values.

*ALLFILE: The search for the journaled entry being retrieved is not limited by a specified file name.

Element 1: Physical File Name

The name of the physical file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

*ALL: Journal entries for all physical files in the specified library (the library name must be specified) whose journaled changes are currently in the journal receiver are retrieved. If *ALL is specified and the user does not have the required authority to all of the files, an error occurs, and the command ends.

physical-file-name: Specify the name of the physical database file for which a journal entry is retrieved.

Element 2: Member Name

*FIRST: An entry for the first member in the file is retrieved.

*ALL: Journal entries for currently existing members in the file are retrieved.

member-name: Specify the name of the member for which a journal entry is retrieved.

If *ALL is specified for the file-name value, this member name is used for all applicable files in the library. For example, if library-name/*ALL *FIRST is specified on the FILE parameter, the journal entries of the first members of all applicable files in the specified library are retrieved.

If the specified physical file does not exist on the system, specify either *ALL or a specific file member name.

RCVRNG
Specifies the qualified names of the starting (first) and ending (last) journal receivers used in the search for a journal entry to be retrieved. The system starts the search with the starting journal receiver (as specified by the first value) and proceeds through the receiver chain until the ending journal receiver (as specified by the second value) is processed.

If dual receivers (pairs of receivers added or removed at the same time) are used at any time, the first of the receivers is used when chaining through the receivers. The Work with Journal Attributes (WRKJRNA) command can be used to display the order of the receivers in the receiver chain. If any problem is found in the receiver chain before the search operation begins, such as damaged or off-line receivers, the system attempts to use the second of the dual receivers. If the second of the receivers is damaged or off-line, or if a problem is found during the operation, the operation ends.

If SEARCH(*ASCEND) is specified, journal receivers must be specified in the order of oldest to newest. If SEARCH(*DESCEND) is specified, journal receivers must be specified in the order of newest to oldest.

*CURRENT: The journal receiver that is currently attached when starting to retrieve journal entries is used.

*CURCHAIN: The journal receiver chain that includes the journal receiver that is currently attached when starting to retrieve journal entries is used. This receiver chain does not cross a break in the chain. If there is a break in the chain, the receiver range is from the most recent break in the chain through the receiver that is attached when starting to retrieve journal entries.

Element 1: Starting Journal Receiver

The name of the starting journal receiver can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

starting-journal-receiver: Specify the name of the first journal receiver that contains journal entries to be retrieved.

Element 2: Ending Journal Receiver

*CURRENT: The journal receiver that is currently attached when starting to retrieve journal entries is used.

The name of the ending journal receiver can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

ending-journal-receiver: Specify the name of the last journal receiver containing journal entries to be searched. If the end of the receiver chain is reached before a receiver of this name is found, an error message is sent and no journal entry is retrieved.

Note: If the maximum number of receivers in the range is larger than 256, an error message is sent and no journal entry is retrieved.

FROMENT
Specifies the first journal entry considered for retrieval.

*FIRST: The first journal entry in the specified journal receiver range is the first entry considered for retrieval. If SEARCH(*DESCEND) is specified, FROMENT(*FIRST) is valid only if TOENT(*FIRST) is also specified.

*LAST: The last journal entry in the specified journal receiver range is the first entry considered for retrieval. If SEARCH(*ASCEND) is specified, FROMENT(*LAST) is valid only if TOENT(*LAST) is also specified.

starting-sequence-number: Specify the sequence number of the journal entry that is the first entry considered for retrieval.

FROMTIME
Specifies the date and time of the first journal entry considered for retrieval. The first journal entry found with the specified date and time or the next later journal entry is the starting point for the search.

starting-date: Specify the starting date using the format defined by the system values QDATFMT and, if separators are used, QDATSEP.

starting-time: Specify the starting time. The time is specified in 24-hour format with or without a time separator as follows:

  • With a time separator, specify a string of 5 or 8 digits, where the time separator for the job separates the hours, minutes, and seconds. If you issue this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command fails.
  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.


TOENT
Specifies the last journal entry considered for retrieval.

*LAST: The search continues until the last journal entry in the specified journal receiver range is processed. If SEARCH(*DESCEND) is specified, TOENT(*LAST) is valid only if FROMENT(*LAST) is also specified.

*FIRST: The search continues until the first journal entry in the specified journal receiver range is processed. If SEARCH(*ASCEND) is specified, TOENT(*FIRST) is only valid if FROMENT(*FIRST) is also specified.

ending-sequence-number: Specify the sequence number of the journal entry that is the final entry considered for retrieval.

Note: The values specified for the FROMENT and TOENT parameter can be the same (for example, FROMENT(234) and TOENT(234) can be specified).

TOTIME
Specifies the date and time of the last entry considered for retrieval. The first journal entry found with the specified date and time, or the latest earlier journal entry is the ending point for the search.

ending-date: Specify the ending date using the format defined by the system values QDATFMT and, if separators are used, QDATSEP.

ending-time: Specify the ending time. See the FROMTIME parameter for a description of time formats.

SEARCH
Specifies the order in which the journal entries are searched to retrieve an entry.

*ASCEND: The journal entries are searched in ascending order (from the oldest entry to the newest entry).

*DESCEND: The journal entries are searched in descending order (from the newest entry to the oldest entry).

JRNCDE
Specifies the journal codes of the journal entries being considered for retrieval.

*ALL: The search for the entry to retrieve is not limited to a specified journal code.

*CTL: The entries considered for retrieval are the journal entries created to control the journal functions. The journal codes for these are J and F.

Element 1: Journal Code Value

journal-code: Specify the journal code to which journal entries are limited. Only journal entries with the specified journal code are retrieved. A list of journal codes that can be specified is provided in the Journal management article in the Information Center .

Element 2: Journal Code Selection

*ALLSLT: The journal entries with the specified journal code are retrieved only if all other selection parameters are satisfied.

*IGNFILSLT: The journal entries having the specified journal code are retrieved only if all selection parameters, except the FILE parameter, are satisfied.

Note: This value is not valid for journal code D, F or R.

ENTTYP
Specifies whether to limit the journal entries retrieved to those of a specified journal entry type.

*ALL: The search for the entry to retrieve is not limited to a specified entry type.

*RCD: Only entries that have an entry type for record-level operations are retrieved. The following entry types are valid: BR, DL, DR, IL, PT, PX, UB, UP, and UR.

entry-type: Specify the entry type that limits the search for the entry journal entries to retrieve. Only journal entries that contain the specified entry type are considered for retrieval. Up to 300 valid entry types can be specified. A list of valid entry types is in the Journal management article in the Information Center .

JOB
Specifies whether the journal entries being retrieved are limited to the journal entries for a specified job. Only journal entries for the specified job are considered for retrieval. If no job name is given, all of the journal entries that contain the simple name of the job are considered for retrieval.

A job identifier is a special value or a qualified name with up to three elements. For example:

*ALL
*
job-name
user-name/job-name
job-number/user-name/job-name

More information on this parameter is in Commonly used parameters.

*ALL: The search is not limited to entries for a specified job.

*: The search is limited to entries for the current job. Only entries for the requesting job are considered for retrieval.

job-name: Specify the name of the job whose journal entries are being considered for retrieval.

user-name: Specify the name of the user of the job whose journal entries are being considered for retrieval.

job-number: Specify the number of the job whose journal entries are being considered for retrieval.

PGM
Specifies the name of a program whose journal entries are considered for retrieval.

*ALL: The search is not limited to entries for a specified program.

program-name: Specify the name of the program whose journal entries are considered for retrieval. Only journal entries for this program are considered for retrieval.

USRPRF
Specifies that the journal entries to be considered for retrieval are limited to the journal entries for a specified user profile name.

*ALL: The retrieval is not limited to entries for a specified user profile.

user-name: Specify the name of the user profile whose journal entries are to be considered for retrieval. Only changes for this user profile that were journaled are considered for retrieval.

CMTCYCID
Specifies that the journal entries considered for retrieval are limited to the journal entries that contain the specified commit cycle identifier.

*ALL: The search is not limited to entries for a specified commit cycle identifier.

commit-cycle-identifier: Specify the commit cycle identifier that limits the search for the entry to retrieve. Only journal entries that contain the commit cycle identifier are considered for retrieval.

DEPENT
Specifies whether to retrieve the journal entries recording actions

  • that occur as a result of a trigger program
  • on records that are part of a referential constraint
  • that will be ignored during an Apply Journaled Changes (APYJRNCHG) or Remove Journaled Changes (RMVJRNCHG) operation.

*ALL: The journal entries relating to trigger programs, referential constraints and the entries which will be ignored by an Apply or Remove Journaled Changes operations are retrieved.

*NONE: The journal entries relating to trigger programs, referential constraints and the entries which will be ignored by an Apply or Remove Journaled Changes operations are not retrieved.

ENTFMT
Specifies the format of the journal entries being retrieved. For a description of what is represented by each of the fields in the journal entry, see the Journal management article in the Information Center .

Lists showing detailed information on the format of the retrieved journal entries are in the RTNJRNE parameter description.

*TYPE1: The retrieved journal entries are formatted to include the minimum information that can be specified. The retrieved journal entries include the information in the format listed in the RTNJRNE parameter description for ENTFMT(*TYPE1).

*TYPE2: The retrieved journal entries include the information returned when ENTFMT(*TYPE1) is specified, the user profile field giving the name of the user who logged the retrieved journal entries, and the name of the system on which the entry was sent.

*TYPE3: The retrieved journal entries include the information returned when ENTFMT(*TYPE2) is specified, and the null value indicators.

*TYPE4: The retrieved journal entries include the information returned when ENTFMT(*TYPE3) is specified, the journal identifier, the physical file trigger indicator, and the referential constraint indicator.

*TYPE5: The retrieved journal entries include the information returned when OUTFILFMT(*TYPE4) is specified, in addition to the program library name, the program library ASP device name, the program library ASP number, the system sequence number, the logical unit of work, the transaction identifier, the thread identifier, the remote address, the address family, the remote port, the arm number, the receiver name, the receiver library name, the receiver library ASP number and the receiver library ASP device name. >

NULLINDLEN
Specifies the length, in bytes, used for the null value indicators portion of the retrieved entry. This parameter is valid only if ENTFMT(*TYPE1) or ENTFMT(*TYPE2) End of changeis not specified. Valid values range from 1 to 8000.

If the retrieved journal entry has fewer null value indicators than the specified field length, the trailing bytes in the null value indicators field will be set to 'F0'X.

INCENT
Specifies whether only the confirmed or both the confirmed and unconfirmed, journal entries are retrieved. This parameter only applies when converting journal entries for output from a remote journal.

Confirmed entries are those journal entries which have been sent to this remote journal and the state of the Input/Output (I/O) to auxiliary storage for the same journal entries on the local journal is known.

Unconfirmed entries are those journal entries which have been sent to this remote journal, but the state of the Input/Output (I/O) to auxiliary storage for the same journal entries on the local journal is not known, or the object name information for those journal entries is not yet known to the remote journal. Unconfirmed journal entries can only exist within the attached receiver of a remote journal. This only applies if synchronous delivery mode is being used for a particular remote journal.

*CONFIRMED: Only those journal entries which have been confirmed are retrieved.

*ALL: All confirmed and unconfirmed journal entries are retrieved.

RTNSEQNBR
Specifies the name of the CL decimal variable in the program into which the journal entry sequence number of the retrieved journal entry is copied. If a CL variable name is not specified, the journal entry sequence number is not copied into the program. The specified variable must be a decimal variable that has a length of ten positions with no decimal positions.

RTNJRNCDE
Specifies the name of the CL character variable in the program into which the journal code of the retrieved journal entry is copied. If a CL variable name is not specified, the journal code of the retrieved journal entry is not copied into the program. The specified variable must be a character variable with a minimum length of 1 character. If the length of the variable is longer than 1 character, it is padded on the right with blanks.

RTNENTTYP
Specifies the name of the CL character variable in the program into which the entry type of the retrieved journal entry is copied. If a CL variable name is not specified, the entry type of the retrieved journal entry is not copied into the program. The specified variable must be a character variable with a minimum length of 2 characters. If the length of the variable is longer than 2 characters, it is padded on the right with blanks.

RTNRCV
Specifies the name of the CL character variable in the program into which the journal receiver name from where the returned journal entry was retrieved is copied. If the CL variable name is not specified, the journal receiver name is not copied into the program. The specified variable must be a character variable with a minimum length of 10 characters. If the length of the variable is longer than 10 characters, it is padded on the right with blanks.

RTNRCVLIB
Specifies the name of the CL character variable in the program into which journal receiver library name identified by the returned journal entry was retrieved is copied. If the CL variable name is not specified, the journal receiver library name is not copied into the program. The specified variable must be a character variable with a minimum length of 10 characters. If the length of the variable is longer than 10 characters, it is padded on the right with blanks.

RTNJRNE
Specifies the name of the CL character variable in the program into which the retrieved journal entry is copied. If a CL variable name is not specified, the retrieved journal entry is not copied into the program. The specified variable must be a character variable. If the retrieved journal entry is longer than the variable's field length, the entry is truncated. If the entry is shorter, it is padded on the right with blanks.

The journal entry can be retrieved in one of Start of change the following possible formats.

The following lists show detailed information on the format of the retrieved journal entries.

If ENTFMT(*TYPE1) is specified, then the format of the fields in the retrieved entry is as follows:

Field Name             Field Attributes
ENTRY LENGTH           TYPE(*DEC) LEN(5 0)
SEQUENCE NUMBER        TYPE(*DEC) LEN(10 0)
JOURNAL CODE           TYPE(*CHAR) LEN(1)
JOURNAL ENTRY TYPE     TYPE(*CHAR) LEN(2)
DATE                   TYPE(*CHAR) LEN(6)
TIME                   TYPE(*DEC) LEN(6 0)
JOB NAME               TYPE(*CHAR) LEN(10)
USER NAME              TYPE(*CHAR) LEN(10)
JOB NUMBER             TYPE(*DEC) LEN(6 0)
PROGRAM NAME           TYPE(*CHAR) LEN(10)
OBJECT NAME            TYPE(*CHAR) LEN(10)
OBJECT LIBRARY         TYPE(*CHAR) LEN(10)
MEMBER NAME            TYPE(*CHAR) LEN(10)
COUNT/RRN              TYPE(*DEC) LEN(10 0)
FLAG                   TYPE(*CHAR) LEN(1)
COMMIT CYCLE ID        TYPE(*DEC) LEN(10 0)
INCOMPLETE DATA        TYPE(*CHAR) LEN(1)
MINIMIZED ENTRY DATA   TYPE(*CHAR) LEN(1)  
RESERVED               TYPE(*CHAR) LEN(6)  
ENTRY-SPECIFIC DATA    TYPE(*CHAR) LEN(up to 9844)

If ENTFMT(*TYPE2) is specified, the format of the fields in the retrieved entry is as follows:

Field Name             Field Attributes
ENTRY LENGTH           TYPE(*DEC) LEN(5 0)
SEQUENCE NUMBER        TYPE(*DEC) LEN(10 0)
JOURNAL CODE           TYPE(*CHAR) LEN(1)
JOURNAL ENTRY TYPE     TYPE(*CHAR) LEN(2)
DATE                   TYPE(*CHAR) LEN(6)
TIME                   TYPE(*DEC) LEN(6 0)
JOB NAME               TYPE(*CHAR) LEN(10)
USER NAME              TYPE(*CHAR) LEN(10)
JOB NUMBER             TYPE(*DEC) LEN(6 0)
PROGRAM NAME           TYPE(*CHAR) LEN(10)
OBJECT NAME            TYPE(*CHAR) LEN(10)
OBJECT LIBRARY         TYPE(*CHAR) LEN(10)
MEMBER NAME            TYPE(*CHAR) LEN(10)
COUNT/RRN              TYPE(*DEC) LEN(10 0)
FLAG                   TYPE(*CHAR) LEN(1)
COMMIT CYCLE ID        TYPE(*DEC) LEN(10 0)
USER PROFILE           TYPE(*CHAR) LEN(10)
SYSTEM NAME            TYPE(*CHAR) LEN(8)
INCOMPLETE DATA        TYPE(*CHAR) LEN(1)
MINIMIZED ENTRY DATA   TYPE(*CHAR) LEN(1)  
RESERVED               TYPE(*CHAR) LEN(18) 
ENTRY-SPECIFIC DATA    TYPE(*CHAR) LEN(up to 9844)

If ENTFMT(*TYPE3) is specified and a value is specified on the NULLINDLEN parameter, the format of the retrieved journal entry is as follows:

Field Name             Field Attributes
ENTRY LENGTH           TYPE(*DEC) LEN(5 0)
SEQUENCE NUMBER        TYPE(*DEC) LEN(10 0)
JOURNAL CODE           TYPE(*CHAR) LEN(1)
JOURNAL ENTRY TYPE     TYPE(*CHAR) LEN(2)
TIMESTAMP              TYPE(*TIMESTAMP) LEN(26)
JOB NAME               TYPE(*CHAR) LEN(10)
USER NAME              TYPE(*CHAR) LEN(10)
JOB NUMBER             TYPE(*DEC) LEN(6 0)
PROGRAM NAME           TYPE(*CHAR) LEN(10)
OBJECT NAME            TYPE(*CHAR) LEN(10)
OBJECT LIBRARY         TYPE(*CHAR) LEN(10)
MEMBER NAME            TYPE(*CHAR) LEN(10)
COUNT/RRN              TYPE(*DEC) LEN(10 0)
FLAG                   TYPE(*CHAR) LEN(1)
COMMIT CYCLE ID        TYPE(*DEC) LEN(10)
USER PROFILE           TYPE(*CHAR) LEN(10)
SYSTEM NAME            TYPE(*CHAR) LEN(8)
NULL VALUE INDICATORS  TYPE(*CHAR) field-length1
ENTRY-SPECIFIC DATA    TYPE(*CHAR) ((up to 9850)
                           minus (field length))2

 

Notes

1
The length of this field is the length specified on the NULLINDLEN parameter.
2
The length of this portion of the entry depends on the length specified on the RTNJRNE parameter and the length specified on the NULLINDLEN parameter.

Note: If ENTFMT(*TYPE3) is specified, the following information is not available in this format:

  1. Incomplete Data indicating if the journal entry data is incomplete due to either LOB fields or Byte Stream File write operations.
  2. Minimized Entry Specific Data indicating if the journal entry has minimized entry specific data because the journal had MINENTDTA specified for the object type of the journal entry.

See the Journal management article in the Information Center for more information on the incomplete data indicator, minimized entry specific data indicator, and these journal entries.

If ENTFMT(*TYPE4) is specified and a value is specified on the NULLINDLEN parameter, the format of the retrieved journal entry is as follows:

Field Name             Field Attributes
ENTRY LENGTH           TYPE(*DEC)  LEN(5 0)
SEQUENCE NUMBER        TYPE(*DEC)  LEN(10 0)
JOURNAL CODE           TYPE(*CHAR) LEN(1)
JOURNAL ENTRY TYPE     TYPE(*CHAR) LEN(2)
TIMESTAMP              TYPE(*TIMESTAMP) LEN(26)
JOB NAME               TYPE(*CHAR) LEN(10)
USER NAME              TYPE(*CHAR) LEN(10)
JOB NUMBER             TYPE(*DEC)  LEN(6 0)
PROGRAM NAME           TYPE(*CHAR) LEN(10)
OBJECT NAME            TYPE(*CHAR) LEN(10)
OBJECT LIBRARY         TYPE(*CHAR) LEN(10)
MEMBER NAME            TYPE(*CHAR) LEN(10)
COUNT/RRN              TYPE(*DEC)  LEN(10 0)
FLAG                   TYPE(*CHAR) LEN(1)
COMMIT CYCLE ID        TYPE(*DEC)  LEN(10)
USER PROFILE           TYPE(*CHAR) LEN(10)
SYSTEM NAME            TYPE(*CHAR) LEN(8)
JOURNAL IDENTIFIER     TYPE(*CHAR) LEN(10)
REF CONSTRAINT         TYPE(*CHAR) LEN(1)
TRIGGER                TYPE(*CHAR) LEN(1)
INCOMPLETE DATA        TYPE(*CHAR) LEN(1)
IGNORE DURING          TYPE(*CHAR) LEN(1) 
APYJRNCHG OR RMVJRNCHG                    
MINIMIZED ENTRY DATA   TYPE(*CHAR) LEN(1) 
RESERVED               TYPE(*CHAR) LEN(5) 
NULL VALUE INDICATORS  TYPE(*CHAR) field-length1
ENTRY-SPECIFIC DATA    TYPE(*CHAR) ((up to 9830)
                           minus (field length))2

 

Notes

1
The length of this field is the length specified on the NULLINDLEN parameter.
2
The length of this portion of the entry depends on the length specified on the RTNJRNE parameter and the length specified on the NULLINDLEN parameter.

If ENTFMT(*TYPE5) is specified, and a value is specified on the NULLINDLEN parameter, the format of the retrieved journal entry is as follows:

Field Name             Field Attributes
ENTRY LENGTH           TYPE(*DEC)  LEN(5 0) 
SEQUENCE NUMBER        TYPE(*CHAR)  LEN(20) 
JOURNAL CODE           TYPE(*CHAR) LEN(1) 
JOURNAL ENTRY TYPE     TYPE(*CHAR) LEN(2) 
TIMESTAMP              TYPE(*TIMESTAMP) LEN(26) 
JOB NAME               TYPE(*CHAR) LEN(10) 
USER NAME              TYPE(*CHAR) LEN(10) 
JOB NUMBER             TYPE(*DEC)  LEN(6 0) 
PROGRAM NAME           TYPE(*CHAR) LEN(10) 
PROGRAM LIBRARY NAME   TYPE(*CHAR) LEN(10)  
PROGRAM ASP DEVICE     TYPE(*CHAR) LEN(10) 
NAME
PROGRAM ASP NUMBER     TYPE(*DEC)  LEN(5 0) 
OBJECT NAME            TYPE(*CHAR) LEN(10) 
OBJECT LIBRARY         TYPE(*CHAR) LEN(10) 
MEMBER NAME            TYPE(*CHAR) LEN(10) 
COUNT/RRN              TYPE(*CHAR) LEN(20) 
FLAG                   TYPE(*CHAR) LEN(1) 
COMMIT CYCLE ID        TYPE(*CHAR) LEN(20) 
USER PROFILE           TYPE(*CHAR) LEN(10) 
SYSTEM NAME            TYPE(*CHAR) LEN(8) 
JOURNAL IDENTIFIER     TYPE(*CHAR) LEN(10) 
REF CONSTRAINT         TYPE(*CHAR) LEN(1) 
TRIGGER                TYPE(*CHAR) LEN(1) 
INCOMPLETE DATA        TYPE(*CHAR) LEN(1) 
IGNORE DURING          TYPE(*CHAR) LEN(1)  
APYJRNCHG OR RMVJRNCHG                     
MINIMIZED ENTRY DATA   TYPE(*CHAR) LEN(1)  
OBJECT INDICATOR       TYPE(*CHAR) LEN(1)  
SYSTEM SEQUENCE        TYPE(*CHAR) LEN(20)  
NUMBER
RECEIVER NAME          TYPE(*CHAR) LEN(10)  
RECEIVER LIBRARY NAME  TYPE(*CHAR) LEN(10)  
RECEIVER ASP DEVICE    TYPE(*CHAR) LEN(10)
NAME 
RECEIVER ASP NUMBER    TYPE(*DEC)  LEN(5 0) 
ARM NUMBER             TYPE(*DEC)  LEN(5 0)  
THREAD IDENTIFIER      TYPE(*CHAR) LEN(8)  
THREAD IDENTIFIER HEX  TYPE(*CHAR) LEN(16)  
ADDRESS FAMILY         TYPE(*CHAR) LEN(1)  
REMOTE PORT            TYPE(*DEC)  LEN(5 0)  
REMOTE ADDRESS         TYPE(*CHAR) LEN(46)  
LOGICAL UNIT OF WORK   TYPE(*CHAR) LEN(39)  
TRANSACTION IDENTIFIER TYPE(*CHAR) LEN(140)  
RESERVED               TYPE(*CHAR) LEN(20)  
NULL VALUE INDICATORS  TYPE(*CHAR) field-length1
ENTRY-SPECIFIC DATA    TYPE(*CHAR) ((up to 9443)
                           minus (field length))2

 

Notes

1
The length of this field is the length specified on the NULLINDLEN parameter.
2
The length of this portion of the entry depends on the length specified on the RTNJRNE parameter and the length specified on the NULLINDLEN parameter.>

Examples for RTVJRNE

Example 1

Assume the following variables are specified:

DCL &SEQ        TYPE(*DEC) LEN(10 0)
DCL &JRNENT     TYPE(*CHAR) LEN(200)
DCL &RCVNAME    TYPE(*CHAR) LEN(10)
DCL &RCVLIB     TYPE(*CHAR) LEN(10)

and this command is run:

RTVJRNE   JRN(MYLIB/JRNA)  ENTTYP(PR)
  RTNSEQNBR(&SEQ#)  RTNJRNE(&JRNENT)

Since no starting journal entry is specified in this command, the first entry from the journal receiver that is currently attached to the journal JRNA in the library MYLIB, when starting to retrieve entries, is considered for retrieval. The first entry in any receiver is always an identifier for the previously-attached receiver. This first receiver entry is known as a type PR entry, and it contains the name of the previously attached receiver in its entry-specific data. The PR entry is the first entry in ascending order in the currently attached receiver; when it is found, the entry is placed into a CL variable named &JRNENT.

Then Change Variable (CHGVAR) can be used to separate the name and library of the previous journal receiver, found in the entry specific data, as follows:

CHGVAR &RCVNAME  (%SST(&JRNENT 126 10))
CHGVAR &RCVLIB  (%SST(&JRNENT 136 10))

Example 2

Assume the following variables are specified:

DCL &ENTNO        TYPE(*DEC) LEN(10 0)
DCL &JCODE        TYPE(*CHAR) LEN(1)
DCL &ETYPE        TYPE(*CHAR) LEN(2)
DCL &RCVNAME      TYPE(*CHAR) LEN(10)
DCL &RCVLIB       TYPE(*CHAR) LEN(10)
DCL &JENTRY       TYPE(*CHAR) LEN(205)

and this command is run:

RTVJRNE   JRN(MYLIB/JRNLA)  FILE(LIB1/A MBR3)
  RCVRNG(RCVLIB/RCV30 RCVLIB/RCV27)
  ORDER(*DESCEND)  JRNCDE(R)  ENTTYP(UP DL)
  JOB(000666/QPGMR/PRESTRT)  PGM(WAKEUP)
  USRPRF(MAC7)  ENTFMT(*TYPE2)
  RTNSEQNBR(&ENTNO)  RTNJRNCDE(&JCODE)
  RTNENTTYP(&ETYPE)  RTNRCV(&RCVNAME)
  RTNRCVLIB(&RCVLIB)  RTNJRNE(&JENTRY)

This command gets a journal entry, searching in descending order the journal receiver chain from receiver RCV30 in library RCVLIB to receiver RCV27 in library RCVLIB, journaled through journal JRNLA in library MYLIB, and copies the entry into the specified CL variables. The retrieved entry is an UPDATE or DELETE entry with journal code R from member MBR3 in file A in library LIB1, created in job 000666/QPGMR/PRESTRT in program WAKEUP by user profile MAC7. The retrieved journal entry includes the user profile field. The sequence number of the retrieved entry is copied into CL variable &ENTNO. The journal code of the retrieved entry is copied into CL variable &JCODE. The entry type of the retrieved entry is copied into CL variable &ETYPE. The name of the journal receiver from which the returned entry was retrieved is copied into &RCVNAME. The library name of the journal receiver from which the returned entry was retrieved is copied into &RCVLIB.

Error messages for RTVJRNE

*ESCAPE Messages

CPF7002
File &1 in library &2 not a physical file.
CPF7006
Member &3 not found in file &1 in &2.
CPF7007
Cannot allocate member &3 file &1 in &2.
CPF701B
Journal recovery of an interrupted operation failed.
CPF705C
INCENT(*ALL) not allowed for a local journal.
CPF7053
Values for RCVRNG parameter not correct; reason code &1.
CPF7054
FROM and TO values not valid.
CPF7055
Maximum number of objects exceeded.
CPF7057
*LIBL not allowed with FILE(*ALL) or OBJ(*ALL).
CPF7060
File &1 member &5 never journaled to journal &3.
CPF7061
Conversion of journal entries failed.
CPF7062
No entries converted or received from journal &1.
CPF7065
Entry type (ENTTYP) not valid for journal code (JRNCDE).
CPF7072
Retrieval of journal entry failed.
CPF7073
No entry retrieved from journal &1 in &2.
CPF7074
RCVRNG for specified SEARCH not valid.
CPF708D
Journal receiver found logically damaged.
CPF709C
JOB, PGM, and USRPRF not valid for receiver range.
CPF9801
Object &2 in library &3 not found.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9809
Library &1 cannot be accessed.
CPF9810
Library &1 not found.
CPF9820
Not authorized to use library &1.
CPF9822
Not authorized to file &1 in library &2.