RCVJRNE (Receive Journal Entry)
RCVJRNE Command syntax diagram
Purpose
The Receive Journal Entry (RCVJRNE) command allows a specified user exit program to continuously receive journal entries. This program can be set up, for example, to write the entries either (1) to an ICF file, supplying updates to a file on a backup system, or (2) on a tape, imitating a journal-to-tape function. The information in the journal entries received can be used to update the database files being journaled to minimize the loss of data in the event of a disk failure, and to update database files on a backup system in case of a system failure on the primary system.
The value specified on the ENTFMT parameter determines the format of the journal entries passed to the exit program.
Restrictions
- If the sequence number is reset in the range of receivers specified, the first occurrence of the FROMENT or TOENT parameter is used if either is specified.
- 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 received.
- 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 the second element of 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.
- 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. >
- If more than the maximum number of objects is identified (32,767 objects), an error occurs and no entries are received. This restriction is ignored if *ALLFILE is specified.
Required Parameters
- JRN
- Specifies the qualified name of the journal where the journal entries are to be received.
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 where the journal entries are to be received.
- EXITPGM
- Specifies the qualified name of a user-written exit program that is given control to receive each journal entry passed from the command. Additional information on the interface between this command and the exit program is supplied after the listing of possible values for this parameter, and is described in more detail in the Journal management article in the Information Center.
The name of the program 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.
program-name: Specify the name of the exit program that controls the reception of each journal entry passed from the command.
Additional Information on the Exit Program Interface
When the program is called, two parameters are passed to it at a time. A single journal entry or a block of journal entries is passed in the first parameter.
- If a single journal entry is passed, and if the length of the parameter defined by the program is smaller than the length of the journal entry, the journal entry passed to the program is truncated. If the length of the parameter defined by the program is greater than the length of the journal entry, the parameter positions beyond the length of the journal entry contain nonessential information. The user's program should not specifically refer to data in the positions beyond the length of the journal entry.
- If BLKLEN(*NONE) was specified, then the exit program may indicate to the system that multiple entries should be returned in subsequent calls to the exit program by specifying 8 in the first byte of the second parameter. This is called "Block Mode" and the exit program must specify the size of the block in bytes as a zoned value in the first 5 bytes of the first parameter. If an error is made in this specification, only one journal entry is passed in the block. If BLKLEN(*NONE) was not specified, then specifying 8 in the first byte of the second parameter will have no effect and the first 5 bytes of the first parameter will be ignored. >
- If pointers are being returned, >this first parameter must be aligned on a 16-byte boundary since journal entry specific data could include actual pointers.
For *TYPE1, *TYPE2, *TYPE3 and *TYPE4 formats >there is a zoned journal entry length field that is filled with zeros at the end of the single journal entry or block of journal entries passed. This field indicates that the last journal entry has been passed. The format of the information in each journal entry is shown in the ENTFMT parameter description. The format of the first parameter is detailed in the Journal management article in the Information Center.
Note: The maximum length of the parameter specification in the exit program is language dependent (for example, for CL, the maximum length is 9999). For more information about limitations refer to the corresponding programming language book. A character variable of LEN(3) is passed in the second exit program parameter. This parameter will be passed from the system to the exit program and can be passed from the exit program to the system. Its values are presented in the following lists:
- Information in the first byte of the second parameter:
- Char(1)
- Passed to the Exit Program from the System
- 0
- No journal entry is passed on this call of the exit program.
- 1
- A single journal entry is passed to the exit program.
- 2
- A block of one or more journal entries is passed to the exit program.
- 3
- No journal entry is passed on this call to the exit program, and no more entries can be passed, because the journal receiver that was attached when the receive journal entry operation started is no longer attached.
Note: The system ends the RCVJRNE command after calling the exit program once with a reason code of 3. - 4
- No journal entry is passed on this call to the exit program, and no more entries can be passed unless the local or remote journal is activated.
Note: This value can only be passed to the exit program when receiving journal entries from the attached receiver of a local or remote journal and the journal state for the journal is currently *INACTIVE.
- Char(1)
- Passed to the System from the Exit Program
- 8
- Requests the command processing program to start passing one or more journal entries in a block. If BLKLEN(*NONE) was not specified, then specifying 8 in the first byte of the second parameter will have no effect and the first 5 bytes of the first parameter will be ignored. >
- 9
- Requests the RCVJRNE command to end. The exit program returns control to the system.
- Information in the second byte of the second parameter:
- Char(1)
- Passed to the Exit Program
- N
- Additional journal entries are not currently available to be passed after this call of the exit program, or the RCVJRNE command will be ending after this call of the exit program.
- Y
- Additional journal entries are currently available to be passed after this call of the exit program.
Any information passed from the exit program to the system in the second byte will be ignored.
The second byte of the second exit program parameter is provided whether journal entries are being passed as a single journal entry per call of the exit program, or as a block of journal entries per call.
- Information in the third byte of the second parameter:
- Char(1)
- Passed to the Exit Program
- '00'x
- One or more journal entries are being passed to the exit program and the object names in the fixed length portion of each journal entry do not necessarily reflect the name of the object at the time the journal entry was deposited into the journal.
Note: This value is returned only when receiving journal entries from a journal receiver that was attached to a journal prior to V4R2M0. - 0
- No journal entries are currently being passed, so the information normally returned in this byte is not applicable.
- 1
- One or more journal entries are being passed to the exit program and the object names in the fixed length portion of each journal entry reflect the name of the object at the time the journal entry was deposited into the journal.
- 2
- One or more journal entries are being passed to the exit program and the object names in the fixed length portion of each journal entry do not necessarily reflect the name of the object at the time the journal entry was deposited into the journal. The object name in the fixed length portion of the journal entry may be returned as a previously known name for the object prior to the journal entry being deposited into the journal or be returned as *UNKNOWN.
Note: This value will only be returned when receiving journal entries from a remote journal and the remote journal is currently being caught up from its source journal. A remote journal is being caught up from its source journal when the Change Remote Journal (CHGRMTJRN) command or Change Journal State (QjoChangeJournalState) API is invoked and is currently replicating journal entries to the remote journal. After the call to the CHGRMTJRN command or QjoChangeJournalState API returns, the remote journal is maintained with a synchronous or asynchronous delivery mode, and the remote journal is no longer being caught up. Any information passed from the exit program to the system in the third byte will be ignored.
The second byte of the second exit program parameter is provided whether journal entries are being passed as a single journal entry per call of the exit program, or as a block of journal entries per call.
Note: When an N is passed to the exit program in the second byte of the second parameter indicating that no additional journal entries are currently available, it does not necessarily mean that when the exit program returns, that the RCVJRNE command will have to wait for additional journal entries to be deposited into the journal. By the time the exit program returns, additional journal entries may already be available and depending upon what was specified on the DELAY parameter, may or may not be immediately passed to the exit program. If DELAY(N) was specified the system will wait N seconds before passing the journal entries to the exit program. If DELAY(*NEXTENT) was specified, the journal entries will immediately be passed to the exit program. The third byte of the second exit program parameter is provided whether journal entries are being processed as a single journal entry per call of the exit program, or as a block of journal entries per call. When returned for a block of journal entries, the attribute applies to the object names for all of the journal entries being returned in the block.
For more information on the exit program and these two parameters used to receive the journal entries, see the Journal management article in the Information Center.
Optional Parameters
- FILE
- Specifies a maximum of 300 qualified file names whose journal entries are received. This parameter also specifies the name of the file member whose journal entries are to be received.
To determine which journal entries are to be received, 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 received.
- 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 received.
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
- 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.
- When specifying a database file on this parameter, journal entries with the following journal code values are received 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 received.
*ALLFILE: The search for the journal entries received is not limited to a specified file name.
Element 1: Physical File Name
The name of the 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 received. 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 received.
Element 2: Member Name
*FIRST: Entries for the first member in the file are received.
*ALL: Entries for currently existing members of the file are received.
member-name: Specify the name of the member for which journal entries are received.
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 received.
If the specified physical file does not exist on the system, specify either *ALL or a specific file member name.
- RCVRNG
- Specifies the starting (first) and ending (last) journal receivers used in the search for the journal entries that are received. 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 last value) is processed.
If dual receivers (receivers attached and detached in pairs) are used at any time, the system uses the first of the paired receivers 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 a problem is found in the receiver chain (such as damaged or not-found receivers) before the search operation begins, the system tries to use the second of the dual receivers. If these receivers also are damaged or not found, the operation ends.
*CURRENT: The journal receiver that is currently attached when starting to receive journal entries is used.
*CURCHAIN: The journal receiver chain that includes the journal receiver that is currently attached when starting to receive 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 receive journal entries.
Element 1: Starting Journal Receiver
The name of the 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 the journal entries to be received.
Element 2: Ending Journal Receiver
*CURRENT: The journal receiver that is currently attached when starting to receive journal entries is used.
The name of the 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 qualified name of the last journal receiver that contains journal entries to be received. If the end of the receiver chain is reached before a receiver with this name is found, an error message is sent and no journal entries are received.
Note: The maximum number of receivers in the range is 256. If more receivers than this maximum are specified, an exception is signaled, and no journal entries are received. - FROMENT
- Specifies the first journal entry considered for reception.
*FIRST: The first journal entry in the journal receiver range specified is the first entry considered for reception.
starting-sequence-number: Specify the sequence number of the first journal entry considered for reception.
- FROMTIME
- Specifies the date and time of the first journal entry considered for reception. The journal entry with the specified date and time or the next later journal entry is the starting point for reception of journal entries.
Element 1: Starting Date
starting-date: Specify the date of the first journal entry considered for reception. The format of the date must be as defined by the job attributes DATFMT and, if separators are used, DATSEP.
Element 2: Starting Time
starting-time: Specify the time of the first journal entry considered for reception. 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 reception.
*NONE: No journal entry is specified. Journal entries are passed to the exit program until the command is canceled (cancel request or cancel job) or until an end reason code (9) is set by the exit program. If there are no more entries to pass, the RCVJRNE command waits the number of seconds indicated on the DELAY parameter before trying to find more entries to pass.
*LAST: The last journal entry in the journal receiver range specified is the last journal entry considered for reception.
ending-sequence-number: Specify the sequence number of the final journal entry considered for reception.
Note: The values specified for the from and to parameters can be the same. For example, FROMENT(234) and TOENT(234) can be specified. - TOTIME
- Specifies the date and time of the last journal entry considered for reception. The first journal entry at or before the specified date and time is the last journal entry considered for reception.
Element 1: Ending Date
ending-date: Specify the date of the last journal entry considered for reception. The format of the date must be as defined by the job attributes DATFMT and, if separators are used, DATSEP.
Element 2: Ending Time
ending-time: Specify the time of the last journal entry considered for reception. See the FROMTIME parameter for a description of time formats.
- NBRENT
- Specifies the total number of journal entries to receive.
*ALL: All journal entries that are for the specified journal receivers and that satisfy the selection values are received.
value: Specify the maximum number of journal entries to receive. If the specified journal entry identified by the TOENT or TOTIME parameter is reached before the value specified for NBRENT is met, the command ends normally.
- JRNCDE
- Specifies whether the entries being considered are limited to the journal entries that contain the specified journal code.
*ALL: The journal entries received are not limited to those containing a specified code.
*CTL: The journal entries received are those written to control the journal functions. These journal entries have codes J or 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 received. 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 received only if all other selection parameters are satisfied.
*IGNFILSLT: The journal entries having the specified journal code are received 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 received to those of a specified journal entry type.
*ALL: The journal entries to be received are not limited to a specified entry type.
*RCD: The journal entries received are limited to those written for record level operations. These are entry types: BR, DL, DR, IL, PT, PX, UB, UP, and UR.
entry-type: Specify the entry type that limits the journal entries received. Only journal entries that contain the specified entry type are received. Up to 300 valid entry types can be specified. A list of valid entry types that can be received is in the Journal management article in the Information Center.
- JOB
- Specifies whether the journal entries received are limited to those for a specified job. If the fully qualified name of the job is not specified, all journal entries that contain the simple job name are considered for reception.
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-nameMore information on this parameter is in Commonly used parameters.
*ALL: The journal entries received are not limited to a specified job.
*: The journal entries received are limited to those for the current job.
job-name: Specify the name of the job whose journal entries are considered for reception.
user-name: Specify the name of the user of the job whose journal entries are considered for reception.
job-number: Specify the number of the job whose journal entries are considered for reception.
- PGM
- Specifies whether the journal entries received are limited to those created for a specified program.
*ALL: The journal entries received are not limited to those created by a specified program.
program-name: Specify the name of the program whose journal entries are considered for reception. Only journal entries for this program are considered for reception.
- USRPRF
- Specifies that the journal entries to be received are limited to the journal entries for a specified user profile name.
*ALL: The journal entries received are not limited to entries for a specified user profile.
user-name: Specify the name of the user profile whose journal entries are considered for reception. Only journal entries for this user profile are considered for reception.
- CMTCYCID
- Specifies that the journal entries are limited to the journal entries that contain the specified commit cycle identifier.
*ALL: The journal entries received are not limited to a specified commit cycle identifier.
commit-cycle-identifier: Specify the commit cycle identifier that limits the journal entries received. Only journal entries that contain the commit cycle ID are considered for reception.
- DEPENT
- Specifies whether to receive 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 received.
*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 received.
- DELAY
- Specifies the number of seconds that the command processing program (CPP) waits for a new journal entry to arrive if the last entry has already been received. After the last entry in the journal is received and passed to the exit program, the CPP tries to receive the next entry. If no new journal entry exists, the exit program is passed a value of 0 in the first byte of the second parameter.
Note: This parameter is valid only when TOENT(*NONE) is specified, and the last receiver specified on the RCVRNG parameter identifies the journal receiver that is currently attached when journal entries are starting to be received. When the last entry on the journal has been passed to the exit program and no journal entries are currently available to be passed to the exit program, one of the following occurs:
- If a number of seconds is specified for the first element in the list, the exit program is immediately called and a '0' is passed to the first byte of the second exit parameter indicating that no additional journal entries are currently available. When the exit program returns control to the command, the system delays for the specified number of seconds.
When the delay time has expired, the system then checks whether any additional journal entries are available to be passed to the exit program. Any additional entries are passed to the exit program sequentially, until there are no more available. When there are no further journal entries available, the exit program is called, and a '0' is passed as the first byte of the second exit program parameter, indicating there are no more journal entries currently available. When the exit program returns control to the command, the system again delays for the specified number of seconds.
If there are no new journal entries to pass to the exit program after the delay, the exit program is called, and a '0' is passed as the first byte of the second exit program parameter to indicate that no further journal entries are available. The exit program then can pass the value '9' for the first byte of the second parameter, indicating that this command is to end.
- If *NEXTENT is specified for the first element in the list, then additional journal entries are passed to the exit program as they become available. When this option is used, the second element in the list indicates the maximum number of seconds between calls to the exit program. If there are no additional journal entries to pass after the specified maximum delay time, the exit program is called, and a '0' is passed to the first byte of the second exit program parameter, indicating that no additional journal entries are currently available.
The maximum delay time can be either of the following:
- The time between a call to the exit program passing the last currently available journal entry, and a subsequent call to the exit program indicating that no new journal entries are available.
- The time between calls to the exit program indicating that no additional journal entries are available.
If the exit program is called after the maximum delay has expired, it then can pass the value '9' for the first byte of the second parameter, indicating that this command is to end.
Note: The previous description of the DELAY parameter assumes that the journal receiver that is currently attached at the beginning of the RCVJRNE command is still attached. If that journal receiver has been detached, the exit program is sent the reason code 3 after all journal entries have been received by the exit program and the RCVJRNE command ends. 30: The command delays 30 seconds before checking whether additional journal entries are available to be passed to the exit program.
seconds: Specify the length, in seconds, that the command delays before checking whether additional journal entries are available to be passed to the exit program. Valid values range from 1 through 99999.
Element 1: Delay Time Value
*NEXTENT: A fixed delay time is not used. Additional journal entries are passed to the exit program as they become available.
Note: If the RCVJRNE exit program causes any additional calls of the RCVJRNE command, those additional calls cannot specify DELAY(*NEXTENT) if a preceeding call specified TOENT(*NONE). Element 2: Maximum Delay Time
This element indicates the maximum number of seconds between calls to the exit program when a fixed delay time is not specified on the first element. This element is valid only if *NEXTENT is specified for the first element.
*CLS: The process default wait time is used as the maximum number of seconds between calls to the exit program.
seconds: Specify the maximum length of time between calls to the exit program, in seconds. Valid values range from 1 to 99999.
- ENTFMT
- Specifies the format of the journal entries being received. 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.
*TYPE1: The journal entries received are formatted to include the minimum information that can be specified. The information fields and the format of the information in each journal entry is shown below:
Table 1. *TYPE1 Journal Entry Format
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Date 6 19 24 Time 6 25 30 Job Name 10 31 40 User Name 10 41 50 Job Number 6 51 56 Program Name 10 57 66 Object Name 10 67 76 Object Library 10 77 86 Member Name 10 87 96 Count/RRN 10 97 106 Flag 1 107 107 Commit Cycle ID 10 108 117 Incomplete data 1 118 118 Minimized Entry Specific Data 1 119 119 Reserved 6 120 125 Entry-Specific Data N2 126 N+125 Note:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- The length of the entry-specific data field varies from entry to entry. It is long enough to accommodate all the entry-specific data in each received journal entry.
*TYPE2: The journal entries received include the information returned when ENTFMT(*TYPE1) is specified, the user profile field, which gives the name of the user who caused the logging of the received journal entries, and the name of the system on which the entry was sent.
The format for *TYPE2 journal entries is shown below.
Table 2. *TYPE2 Journal Entry Format
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Date 6 19 24 Time 6 25 30 Job Name 10 31 40 User Name 10 41 50 Job Number 6 51 56 Program Name 10 57 66 Object Name 10 67 76 Object Library 10 77 86 Member Name 10 87 96 Count/RRN 10 97 106 Flag 1 107 107 Commit Cycle ID 10 108 117 User Profile 10 118 127 System Name 8 128 135 Incomplete data 1 136 136 Minimized Entry Specific Data 1 137 137 Reserved 18 138 155 Entry-Specific Data N2 156 N + 155 Note:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- The length of the entry-specific data field varies from entry to entry. It is long enough to accommodate all the entry-specific data in each received journal entry.
*TYPE3: The journal entries received include the information returned when ENTFMT(*TYPE2) is specified, and the null value indicators. The format of the received entries depends on the value specified on the NULLINDLEN parameter. The tables in the NULLINDLEN parameter description show the three formats for *TYPE3.
*TYPE4: The journal entries received include the information returned when ENTFMT(*TYPE3) is specified, the journal identifier, the physical file trigger indicator, and the referential constraint indicator. The format of the received entries depends on the value specified on the NULLINDLEN parameter. The tables in the NULLINDLEN parameter description show the three formats for *TYPE4.
*TYPEPTR: The journal entries received include the information returned when ENTFMT(*TYPE4) is specified, and the entry specific data could contain pointers for specific journal entry types. The format of the received entries depends on the value specified on the NULLINDLEN parameter. The format of the received entries matches
format RJNE0100 which is described in the Retrieve Journal Entries (QjoRetrieveJournalEntries) API. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with this format.
*JRNENTFMT: The format of the received journal entries is determined by the JRNENTFMT parameter. The RTNPTR parameter indicates if the received journal entries could contain pointers. >
- NULLINDLEN
- Specifies the length, in bytes, used for the null value indicators portion of the journal entry received by the user. This parameter
is not valid if ENTFMT(*TYPE1) or ENTFMT(*TYPE2) >is specified.
*ENTFMT: All null value indicators are received for each journal entry. The format for this value is shown in the following tables.
Note: The number of null value indicators, as well as the length of the entry-specific data can vary from entry to entry. In the following table, the number of null value indicators is designated by the variable 'M' and the length of the entry-specific data is designated by the variable 'N'. Note: If the users selects the *TYPE3 format, the following information is not available in this format:
- Incomplete Data indicating if the journal entry data is incomplete due to either LOB fields or Byte Stream File write operations.
- 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 Journal management article in the Information Center for more information on the incomplete data indicator, the minimized entry specific data indicator, and these journal entries.
Table 3. NULLINDLEN(*ENTFMT) Journal Entry Format for ENTFMT(*TYPE3)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Number of Null Value Indicators2 5 150 154 Null Value Indicators M 155 154+M Length of Entry-Specific Data3 5 155+M 159+M Entry-Specific Data N 160+M 159+ M+N Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- This field contains the number of null value indicators (in decimal digits) in the received journal entry.
- 3
- This field contains the length of the entry-specific data (in decimal digits) in the received journal entry.
Table 4. NULLINDLEN(*ENTFMT) Journal Entry Format for ENTFMT(*TYPE4)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Journal Identifier 10 150 159 Referential
Constraint1 160 160 Trigger 1 161 161 Incomplete data 1 162 162 Ignore during
APYJRNCHG or RMVJRNCHG1 163 163 Minimized Entry Specific Data 1 164 164 Reserved 5 165 169 Number of Null Value Indicators2 5 170 174 Null Value Indicators M 175 174+M Length of Entry-Specific Data3 5 175+M 179+M Entry-Specific Data N 180+M 179+ M+N Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- This field contains the number of null value indicators (in decimal digits) in the received journal entry.
- 3
- This field contains the length of the entry-specific data (in decimal digits) in the received journal entry.
Table 5. NULLINDLEN(*ENTFMT) Journal Entry Format for ENTFMT(*TYPEPTR) or ENTFMT(*JRNENTFMT)
For ENTFMT(*TYPEPTR), the format of this data is the same as RJNE0100 in the Retrieve Journal Entries (QjoRetrieveJournalEntries) API. For ENTFMT(*JRNENTFMT), the format of the data is determined by the JRNENTFMT parameter. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with these formats. field-length: Specify the field length for the null value indicators portion of the received journal entry. Valid values range from 1 to 8000 characters. The format of the received journal entry is shown in the following tables.
Table 6. NULLINDLEN(field-length) Journal Entry Format for ENTFMT(*TYPE3)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Null Value Indicators field length2 150 149+ field length Entry-Specific Data M3 150+ field length 149+ M+ field length Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- The length of the null value indicators field is the length specified on the NULLINDLEN parameter.
- 3
- The length of the entry-specific data field varies from entry to entry. It is long enough to accommodate all the entry-specific data in each received journal entry.
Table 7. NULLINDLEN(field-length) Journal Entry Format for ENTFMT(*TYPE4)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Journal Identifier 10 150 159 Referential
Constraint1 160 160 Trigger 1 161 161 Incomplete data 1 162 162 Ignore during
APYJRNCHG or RMVJRNCHG1 163 163 Minimized Entry Specific Data 1 164 164 Reserved 5 165 169 Null Value Indicators field length2 170 169+ field length Entry-Specific Data M3 170+ field length 169+ M+ field length Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- The length of the null value indicators field is the length specified on the NULLINDLEN parameter.
- 3
- The length of the entry-specific data field varies from entry to entry and is designated by the variable M. This length accommodates all of the entry-specific data in each received journal entry.
Table 8. NULLINDLEN(field-length) Journal Entry Format for ENTFMT(*TYPEPTR) or ENTFMT(*JRNENTFMT)
For ENTFMT(*TYPEPTR), the format of this data is the same as RJNE0100 in the Retrieve Journal Entries (QjoRetrieveJournalEntries) API. For ENTFMT(*JRNENTFMT), the format of the data is determined by the JRNENTFMT parameter. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with these formats. If the journal entry being passed to the exit program has fewer null value indicators than the length specified on the NULLINDLEN parameter, the trailing bytes are set to 'F0'X. Conversely, if a journal entry received has more null value indicators than the specified field length and truncation will result in the loss of a 'F1'X indicator value, the RCVJRNE request is ended.
Element 1: Variable-Length Field
*VARLEN: The null value indicators field is a variable-length field. The received journal entry has the format specified in the table at the end of this parameter description.
Element 2: Maximum Field Length
The maximum length of the null value indicators field.
maximum-field-length: Specify the maximum number of null value indicators to be included in each received journal entry. Valid values range from 1 to 8000. If a journal entry received has more null value indicators than the specified field length and truncation will result in the loss of a 'F1'X indicator value, the RCVJRNE request is ended. The format of the received journal entry is shown in the following tables.
Table 9. NULLINDLEN(*VARLEN field-length) Journal Entry Format for ENTFMT(*TYPE3)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Number of Null Value Indicators2 2 150 151 Null Value Indicators field length 152 151+ field length Length of Entry -Specific Data3 5 152+ field length 156+ field length Entry-Specific Data M 157+ field length 156+ M+ field length Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- This field contains the number of null value indicators (in binary digits) in the received journal entry.
- 3
- This field contains the length of the entry-specific data (in decimal digits) in the received journal entry.
Table 10. NULLINDLEN(*VARLEN field-length) Journal Entry Format for ENTFMT(*TYPE4)
Field Name Length From To Entry Length 51 1 5 Sequence Number 10 6 15 Journal Code 1 16 16 Journal Entry Type 2 17 18 Timestamp 26 19 44 Job Name 10 45 54 User Name 10 55 64 Job Number 6 65 70 Program Name 10 71 80 Object Name 10 81 90 Object Library 10 91 100 Member Name 10 101 110 Count/RRN 10 111 120 Flag 1 121 121 Commit Cycle ID 10 122 131 User Profile 10 132 141 System Name 8 142 149 Journal Identifier 10 150 159 Referential Constraint 1 160 160 Trigger 1 161 161 Incomplete data 1 162 162 Ignore during
APYJRNCHG or RMVJRNCHG1 163 163 Minimized Entry Specific Data 1 164 164 Reserved 5 165 169 Number of Null Value Indicators2 2 170 171 Null Value Indicators field length 172 171+ field length Length of Entry -Specific Data3 5 172+ field length 176+ field length Entry-Specific Data M4 177+ field length 176+ M+ field length Notes:
- 1
- The length of the entry will be in bytes if BLKLEN(*NONE) was specified or in kilobytes if a value other than BLKLEN(*NONE) was specified.>
- 2
- This field contains the number of null value indicators (in binary digits) in the received journal entry.
- 3
- This field contains the length of the entry-specific data (in decimal digits) in the received journal entry.
- 4
- The length of entry-specific data can vary from entry to entry and is designated by the variable M.
Table 11. NULLINDLEN(*VARLEN field-length) Journal Entry Format for ENTFMT(*JRNENTFMT)
The format of this data is determined by the JRNENTFMT parameter. JRNENTFMT formats are described in the Retrieve Journal Entries (QjoRetrieveJournalEntries) API. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with these formats. - INCENT
- Specifies whether only the confirmed or both the confirmed and unconfirmed, journal entries are received. This parameter only applies when receiving 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 received.
*ALL: All confirmed and unconfirmed journal entries are received.
- JRNENTFMT
- Specifies the format of the journal entries received by the exit program. The formats are described in the Retrieve Journal Entries (QjoRetrieveJournalEntries) API. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with these formats. This parameter is only valid if ENTFMT(*JRNENTFMT) is also specified.
RJNE0100: Received journal entries are in RJNE0100 format.
RJNE0200: Received journal entries are in RJNE0200 format.
- RTNPTR
- Specifies whether the journal entries received include entry specific data that could contain pointers for specific journal entry types. This parameter is only valid if ENTFMT(*JRNENTFMT) is also specified.
*NONE: Received journal entries will not include pointers.
*SYSMNG: Specifies that received journal entries received include entry specific data that could contain pointers for specific journal entry types. The system will manage the releasing of the resources related to pointers that are received in the journal entries. The pointers, their associated pointer handles and any related storage will be released when the exit program returns control to the system.
*USRMNG: Specifies that received journal entries received include entry specific data that could contain pointers for specific journal entry types. The user will manage the releasing of the resources related to pointers that are received in the journal entries. Neither the pointers, their associated pointer handles or any related storage will be released when the exit program returns control to the system. The user must use the Delete Pointer Handle (QjoDeletePointerHandle) API to release these resources. See the Application Program Interfaces (APIs) topic in the Information Center for the details associated with this API.
- BLKLEN
- Specifies whether the system will be sending one or more journal entries to the exit program and specifies the block length of the buffer passed to the exit program. The EXITPGM parameter has further details about block mode semantics.
*NONE: At most one journal entry will be sent to the exit program.
*CALC: One or more journal entries will be passed to the exit program in a block. The length of the block passed (the first parameter passed to the exit program) is determined by the system and will be optimal.
block-length: Specify the length in kilobytes of the buffer passed to the exit program (EXITPGM parameter). Valid values range from 32 to 4000. >
Examples for RCVJRNE
Example 1: Receiving Journal Entries
RCVJRNE JRN(APPLIB/JRN1) EXITPGM(MYLIB/RCVPGM) FILE(APPLIB/FILE3) TOENT(*LAST) ENTFMT(*TYPE3) NULLINDLEN(*ENTFMT)This command receives journal entries from the journal receiver that is currently attached (when journal entries are starting to be received) to the journal JRN1 in library APPLIB and passes them one at a time to program RCVPGM in library MYLIB. Only entries with file-level information for the first member of file FILE3 in library APPLIB are received. The format of each entry passed to the exit program is shown in the "NULLINDLEN(*ENTFMT) Journal Entry Format for ENTFMT(*TYPE3)" table shown within the NULLINDLEN parameter description.
Example 2: Receiving Journal Entries
RCVJRNE JRN(JRNLIB/MYJRN) EXITPGM(RCVLIB/PGMA) FILE(FILELIB/PFILEB MBRONE) TOENT(*LAST) ENTFMT(*TYPE3) NULLINDLEN(*VARLEN 30)This command receives journal entries with file-level information for member MBRONE of file PFILEB in library FILELIB from the journal receiver currently attached (when journal entries are starting to be received) to journal MYJRN in library JRNLIB and sends them one at a time to program PGMA in library RCVLIB. The format of each entry passed to the exit program is shown in the "NULLINDLEN(*VARLEN field-length) Journal Entry Format for ENTFMT(*TYPE3)" table at the end of the NULLINDLEN parameter description. The null value indicators portion of each received entry is 30 characters in length.
Example 3: Receiving Journal Entries Using DELAY(*NEXTENT)
RCVJRNE JRN(JRNLIB/MYJRN) EXITPGM(RCVLIB/PGMA) RCVRNG(*CURCHAIN) TOENT(*NONE) DELAY(*NEXTENT)This command receives all available journal entries from the chain of journal receivers, which includes the journal receiver that is attached at the start of receiving journal entries, associated with the journal MYJRN in the library JRNLIB. These journal entries are sent sequentially to exit program PGMA in library RCVLIB, as they become available. The maximum length of time between calls to the exit program is equal to the process default wait time value.
Error messages for RCVJRNE
*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).
- CPF706A
- Significant null value indicator truncated.
- CPF706D
- RCVJRNE exit program &1 in &2 failed.
- 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).
- CPF707B
- DELAY(*NEXTENT) not allowed.
- CPF7074
- RCVRNG for specified SEARCH not valid.
- CPF708C
- DELAY(*NEXTENT) not allowed with INCENT(*ALL).
- CPF708D
- Journal receiver found logically damaged.
- CPF709C
- JOB, PGM, and USRPRF not valid for receiver range.
- CPF7096
- Ending receiver for RCVRNG must identify an attached receiver.
- 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.