Where allowed to run: Compiled CL program or interpreted REXX (*BPGM *IPGM *BREXX *IREXX) Threadsafe: No |
Parameters Examples Error messages |
The Retrieve Journal Entry (RTVJRNE) command allows you to get a particular 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 (RTNSEQNBRLRG, 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:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
JRN | Journal | Qualified object name | Required, Positional 1 |
Qualifier 1: Journal | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
FILE | Journaled physical file | Single values: *ALLFILE Other values (up to 300 repetitions): Element list |
Optional, Positional 2 |
Element 1: File | Qualified object name | ||
Qualifier 1: File | Name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Member | Name, *FIRST, *ALL, *NONE | ||
OBJ | Objects | Values (up to 300 repetitions): Element list | Optional |
Element 1: Object | Qualified object name | ||
Qualifier 1: Object | Name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Object type | *FILE, *DTAARA, *DTAQ | ||
Element 3: Member, if data base file | Name, *FIRST, *ALL, *NONE | ||
OBJPATH | 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 |
SUBTREE | Directory subtree | *NONE, *ALL | Optional |
RCVRNG | Range of journal receivers | Single values: *CURRENT, *CURCHAIN Other values: Element list |
Optional, Positional 3 |
Element 1: Starting journal receiver | Qualified object name | ||
Qualifier 1: Starting journal receiver | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Ending journal receiver |
Single values: *CURRENT Other values: Qualified object name |
||
Qualifier 1: Ending journal receiver | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
PATTERN | Name pattern | Values (up to 20 repetitions): Element list | Optional |
Element 1: Pattern | Character value, * | ||
Element 2: Include or omit | *INCLUDE, *OMIT | ||
FROMENTLRG | Starting large sequence number | Character value, *FIRST, *LAST | Optional |
FROMTIME | Starting date and time | Element list | Optional |
Element 1: Starting date | Date | ||
Element 2: Starting time | Time | ||
TOENTLRG | Ending large sequence number | Character value, *LAST, *FIRST | Optional |
TOTIME | Ending date and time | Element list | Optional |
Element 1: Ending date | Date | ||
Element 2: Ending time | Time | ||
SEARCH | Search | *ASCEND, *DESCEND | Optional |
JRNCDE | Journal codes | Single values: *ALL, *CTL Other values (up to 16 repetitions): Element list |
Optional |
Element 1: Journal code value | A, B, C, D, E, F, J, L, M, P, Q, R, S, T, U | ||
Element 2: Journal code selection | *ALLSLT, *IGNFILSLT, *IGNOBJSLT | ||
ENTTYP | Journal entry types | Single values: *ALL, *RCD Other values (up to 300 repetitions): Character value |
Optional |
JOB | Job name | Single values: *ALL, * Other values: Qualified job name |
Optional |
Qualifier 1: Job name | Name | ||
Qualifier 2: User | Name | ||
Qualifier 3: Number | 000000-999999 | ||
PGM | Program | Name, *ALL | Optional |
USRPRF | User profile | Name, *ALL | Optional |
CCIDLRG | Commit cycle large identifier | Character value, *ALL | Optional |
DEPENT | Dependent entries | *ALL, *NONE | Optional |
ENTFMT | Entry format | *TYPE1, *TYPE2, *TYPE3, *TYPE4, *TYPE5 | Optional |
FMTMINDTA | Format minimized data | *NO, *YES | Optional |
NULLINDLEN | Null value indicators length | 1-8000 | Optional |
INCENT | Include entries | *CONFIRMED, *ALL | Optional |
FROMENT | Starting sequence number | 1-9999999999, *FIRST, *LAST | Optional |
TOENT | Ending sequence number | 1-9999999999, *LAST, *FIRST | Optional |
CMTCYCID | Commit cycle identifier | 1-9999999999, *ALL | Optional |
RTNSEQLRG | CL var for RTNSEQLRG (20) | Character value | Optional |
RTNJRNCDE | CL var for RTNJRNCDE (1) | Character value | Optional |
RTNENTTYP | CL var for RTNENTTYP (2) | Character value | Optional |
RTNRCV | CL var for RTNRCV (10) | Character value | Optional |
RTNRCVLIB | CL var for RTNRCVLIB (10) | Character value | Optional |
RTNJRNE | CL var for RTNJRNE (1) | Character value | Optional |
RTNSEQNBR | CL var for RTNSEQNBR (10 0) | Decimal number | Optional |
Top |
Specifies the journal from which the journal entry is retrieved.
This is a required parameter.
Qualifier 1: Journal
Qualifier 2: Library
Top |
Specifies a maximum of 300 files whose journal entries are retrieved. This parameter also specifies 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:
There may be more than one journal identifier associated with a specified object within the specified receiver range. This can happen when a journaled object is deleted, and then a new object is created with the same name and journaled to the same journal.
Notes:
Single values
Element 1: File
Qualifier 1: File
Qualifier 2: Library
Element 2: Member
If *ALL is specified for the file-name element, 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.
Top |
Specifies a maximum of 300 qualified object names whose journal entries are to be retreived The possible object types are *FILE, *DTAARA, and *DTAQ. If *FILE is specified, this parameter also specifies the name of the file member whose journal entries are to be retrieved.
Either the FILE parameter may be specified, or one or more of the object parameters (OBJ, OBJPATH, or OBJFID) may be specified, but not both.
To determine which journal entries are to be retrieved, based on the specified object name, the following is done:
There may be more than one journal identifier associated with a specified object within the specified receiver range. This can happen when a journaled object is deleted, and then a new object is created with the same name and journaled to the same journal.
Notes:
Element 1: Object
Qualifier 1: Object
Qualifier 2: Library
Element 2: Object type
Specify the object type of the object whose journaled changes are to be retrieved.
Element 3: Member, if data base file
Specify the name of the member in the file whose journal entries are to be retrieved. If *ALL is specified for the first part of this parameter, the value specified for the member name is used for all applicable files in the library. For example, if *FIRST is specified, the journal entries of the first member of all applicable files in the specified library are retrieved.
Note: If the specified object type is not *FILE, the member name element value is ignored.
If *ALL is specified for the object-name element, this member name is used for all applicable files in the library. For example, if library-name/*ALL *FILE *FIRST is specified on the OBJ parameter, the journal entries of the first members of all applicable files in the specified library are retrieved.
Top |
Specifies a maximum of 300 objects whose journal entries are to be retrieved. Only objects whose path name identifies an object of type *STMF, *DIR or *SYMLNK that are in the "root" ('/'), QOpenSys, and user-defined file systems are supported. All other objects are ignored.
This parameter is not valid for remote journals.
Either the FILE parameter may be specified, or one or more of the object parameters (OBJ, OBJPATH, or OBJFID) may be specified, but not both.
Only objects that are currently linked with the specified path name and have a journal identifier associated with them are used in journal entry selection. If the specified object does exist, the journal identifier associated with that link is used for journal entry selection. If a specified object does not exist or does not have a journal identifier associated with it, that link is not used in selecting journal entries and no error is sent.
Notes:
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 path name 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 a maximum of 300 file identifiers (FID) whose journal entries are to be retrieved. 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 or *SYMLNK that are in the "root" ('/'), QOpenSys, and user-defined file systems are supported. All other objects are ignored.
Either the FILE parameter may be specified, or one or more of the object parameters (OBJ, OBJPATH, or OBJFID) may be specified, but not both.
To determine which journal entries are to be received, based on the specified file identifier, the following is done:
Notes:
Top |
Specifies whether the directory subtrees are included in determining the objects for which journal entries are to be retrieved.
Note: This parameter is only valid if one or more path names were specified on the OBJPATH parameter.
Top |
Specifies 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 *ASCEND is specified for the Search prompt (SEARCH parameter), journal receivers must be specified in the order of oldest to newest. If *DESCEND is specified for the Search (SEARCH) parameter, journal receivers must be specified in the order of newest to oldest.
Note: If the maximum number of receivers (2045) in the range is surpassed, an error occurs and no journal entries are retrieved.
Single values
Element 1: Starting journal receiver
Qualifier 1: Starting journal receiver
Qualifier 2: Library
Element 2: Ending journal receiver
Qualifier 1: Ending journal receiver
Qualifier 2: Library
Top |
Specifies a maximum of 20 patterns to be used to include or omit objects for which journal entries are to be retrieved.
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.
If the Name Pattern parameter is not specified the default will be to match all patterns.
Note: This parameter is only valid if one or more path names were specified on the OBJPATH parameter.
Element 1: Pattern
If the Name Pattern 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.
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 directory subtrees are included or omitted.
Top |
Specifies the first journal entry considered for retrieval.
Note: You can specify a value for either the Starting sequence number (FROMENT) parameter or the Starting large sequence number (FROMENTLRG) parameter, but not for both.
Top |
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.
Element 1: Starting date
Element 2: Starting time
The time can be specified in 24-hour format with or without a time separator:
Top |
Specifies the last journal entry considered for retrieval.
Note: You can specify a value for either the Ending sequence number (TOENT) parameter or the Ending large sequence number (TOENTLRG) parameter, but not for both.
Note: The values specified for the FROMENT and TOENT parameter can be the same. For example, FROMENT(234) and TOENT(234) can be specified.
Top |
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.
Element 1: Ending date
Element 2: Ending time
The time can be specified in 24-hour format with or without a time separator:
Top |
Specifies the order in which the journal entries are searched to retrieve an entry.
Top |
Specifies the journal codes of the journal entries being considered for retrieval.
Single values
Element 1: Journal code value
An explanation of the journal codes that can be specified is in the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Element 2: Journal code selection
Note: This value is not valid for journal codes D, F, and R. This value is not valid if the OBJ, OBJPATH, or OBJFID parameters are specified.
Note: This value is not valid for journal codes B, D, E, F, Q, and R. This value is not valid if the FILE parameter is specified.
Top |
Specifies whether to limit the journal entries retrieved to those of a specified journal entry type.
Single values
Other values
Top |
Specifies that the journal entries searched for retrieval are limited to the journal entries for the specified job.
Single values
Other values
Top |
Specifies that the journal entries considered for retrieval are limited to the journal entries created by the specified program.
Top |
Specifies that the journal entries considered for retrieval are limited to the journal entries for a specified user profile.
Top |
Specifies that the journal entries considered for retrieval are limited to the journal entries containing the specified commit cycle identifier. A commit cycle consists of all journal entries sharing the same commit cycle identifier. A journal entry's commit cycle identifier can be displayed by using the Display Journal (DSPJRN) command and entering option five.
Note: You can input a value for either the Commit cycle identifier field (CMTCYCID) or the Commit cycle large identifier field (CCIDLRG) but not for both.
Top |
Specifies whether to retrieve the journal entries recording actions
Top |
Specifies the format of the retrieved journal entry. For a description of what is represented by each of the fields in the journal entry, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Lists showing detailed information on the format of the retrieved journal entries are in the RTNJRNE parameter description.
Note: If ENTFMT(*TYPE1) or ENTFMT(*TYPE2) is not specified, the NULLINDLEN parameter must be specified.
Note: If the Receiver size options field (RCVSIZOPT) for the journal was specified as *MAXOPT3, the sequence number, commit cycle identifier, the count of entries applied or removed or relative record number fields can reach a maximum value of 18,446,744,073,709,551,600. The length of these fields for the ENTFMT(*TYPE1), ENTFMT(*TYPE2), ENTFMT(*TYPE3), and ENTFMT(*TYPE4) formats is defined to hold a 10 digit number. Only the *TYPE5 format has fields large enough to hold this maximum value. When returning these fields for a format other than *TYPE5, if a sequence number, commit cycle identifier, or count of entries applied or removed or relative record number larger than 10 digits is found, the field is set to -1 for that entry.
Top |
Specifies whether entry specific data which has been minimized on field boundaries will be returned in a readable format.
Top |
Specify the length used for the null value indicators portion of the retrieved entry. This parameter is not valid if ENTFMT(*TYPE1) or ENTFMT(*TYPE2) is specified. Valid values range from 1 to 8000 bytes. If the retrieved journal entry has fewer null value indicators than the specified field length, the trailing bytes in the null value indicators field is set to 'F0'X.
Null value indicators are present in journal entries for record level operations as follows:
If the record image has not been minimized in the entry specific data, then there is one null value indicator per field in the physical file. Each indicator is one character long and can be either:
If the record image has been minimized on file field boundaries in the entry specific data and FMTMINDTA(*YES) was specified on the RCVJRNE command, then there is one null value indicator per field in the physical file. Each indicator is one character long and can be either:
If the record image has been minimized on file field boundaries in the entry specific data and FMTMINDTA(*NO) was specified on the RTVJRNE command, then an internal value is returned for the null value indicator.
Top |
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.
Top |
Specifies the first journal entry considered for retrieval.
Note: You can specify a value for either the Starting sequence number (FROMENT) parameter or the Starting large sequence number (FROMENTLRG) parameter, but not for both.
Top |
Specifies the last journal entry considered for retrieval.
Note: You can specify a value for either the Ending sequence number (TOENT) parameter or the Ending large sequence number (TOENTLRG) parameter, but not for both.
Note: The values specified for the FROMENT and TOENT parameter can be the same. For example, FROMENT(234) and TOENT(234) can be specified.
Top |
Specifies that the journal entries considered for retrieval are limited to the journal entries containing the specified commit cycle identifier. A commit cycle consists of all journal entries sharing the same commit cycle identifier. A journal entry's commit cycle identifier can be displayed by using the Display Journal (DSPJRN) command and entering option five.
Note: You can input a value for either the Commit cycle identifier field (CMTCYCID) or the Commit cycle large identifier field (CCIDLRG) but not for both.
Top |
Specifies the name of the program CL character variable 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 character variable that has a length of twenty positions. If the retrieved sequence number is shorter than the length of the field, the number is padded on the right with blanks.
Top |
Specifies the name of the program CL character variable 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.
Top |
Specifies the name of the program CL character variable 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.
Top |
Specifies the name of the program CL character variable into which the journal receiver name from which 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.
Top |
Specifies the name of the CL character variable into which the name of the library containing the receiver of the retrieved journal entry 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.
Top |
Specifies the name of the program CL character variable 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 following lists show detailed information on the format of the retrieved journal entries.
The journal entry can be retrieved in one of the following possible formats:
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 (1) 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 (2) TYPE(*DEC) LEN(10 0) FLAG TYPE(*CHAR) LEN(1) COMMIT CYCLE ID (3) 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 32642) Notes: (1) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the sequence number is larger than 10 digits. (2) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the count of entries applied or removed or relative record number is larger than 10 digits. (3) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the commit cycle identifier is larger than 10 digits. |
If ENTFMT(*TYPE2) 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 (1) 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 (2) TYPE(*DEC) LEN(10 0) FLAG TYPE(*CHAR) LEN(1) COMMIT CYCLE ID (3) 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 32612) Notes: (1) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the sequence number is larger than 10 digits. (2) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the count of entries applied or removed or relative record number is larger than 10 digits. (3) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the commit cycle identifier is larger than 10 digits. |
Note: If ENTFMT(*TYPE3) is specified, the following information is not available in this format:
See the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter for more information on the incomplete data indicator, the minimized entry specific data indicator, and these journal entries.
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 (3) 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 (4) TYPE(*DEC) LEN(10 0) FLAG TYPE(*CHAR) LEN(1) COMMIT CYCLE ID (5) TYPE(*DEC) LEN(10) USER PROFILE TYPE(*CHAR) LEN(10) SYSTEM NAME TYPE(*CHAR) LEN(8) NULL VALUE INDICATORS TYPE(*CHAR) field-length (1) ENTRY-SPECIFIC DATA TYPE(*CHAR) ((up to 32618) 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. (3) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the sequence number is larger than 10 digits. (4) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the count of entries applied or removed or relative record number is larger than 10 digits. (5) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the commit cycle identifier is larger than 10 digits. |
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 (3) 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 (4) TYPE(*DEC) LEN(10 0) FLAG TYPE(*CHAR) LEN(1) COMMIT CYCLE ID (5) 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-length (1) ENTRY-SPECIFIC DATA TYPE(*CHAR) ((up to 32598) 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. (3) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the sequence number is larger than 10 digits. (4) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the count of entries applied or removed or relative record number is larger than 10 digits. (5) When the RCVSIZOPT of the journal is *MAXOPT3, this field will be set to -1 if the commit cycle identifier is larger than 10 digits. |
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) OBJECT TYPE TYPE(*CHAR) LEN(7) FILE TYPE INDICATOR TYPE(*CHAR) LEN(1) NESTED COMMIT LEVEL TYPE(*DEC) LEN(7 0) RESERVED TYPE(*CHAR) LEN(5) NULL VALUE INDICATORS TYPE(*CHAR) field-length (1) ENTRY-SPECIFIC DATA TYPE(*CHAR) ((up to 32212) 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. |
Top |
Specifies the name of the program CL decimal variable 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. If the sequence number is larger than 9,999,999,999, this value is set to -1, left-aligned and padded on the right with blanks. Use the CL var for RTNSEQLRG (20) (RTNSEQLRG) parameter to retrieve a value larger than 9,999,999,999.
Top |
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.
Change Variable (CHGVAR) can then 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) OBJ(LIB1/A *FILE 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.
Top |
*ESCAPE Messages
Top |