CL Command Reference - RCVJRNE
CL Command List > RCVJRNE Reference
Description:
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 objects being journaled to minimize the loss of data in the event of a disk failure, and to update objects 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 the receivers specified, the first occurrence of FROMENTLRG or FROMENT is used, if they are specified. If TOENTLRG or TOENT is specified, the first occurance after the FROMENTLRG or FROMENT entry is used, if FROMENTLRG or FROMENT is specified. Otherwise the first occurance is used.
. The FILE, OBJ, OBJPATH, OBJFID, SUBTREE, PATTERN, JRNCDE, ENTTYP, JOB, PGM, USRPRF, CCIDLRG, CMTCYCID, and DEPENT parameters can be used to specify a subset of all available entries within a range of journal entries.
¨C If no values are specified using these parameters, all available journal entries are received.
¨C 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 or *IGNOBJSLT is specified on the JRNCDE parameter.
¨C 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.
¨C If a journal code is specified on the JRNCDE parameter and *IGNOBJSLT 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 OBJ, OBJPATH, OBJFID, SUBTREE, and PATTERN parameters.
. 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 the journal when a receiver size option (RCVSIZOPT) or a fixed length data option (FIXLENDTA) that would have omitted this data was in effect.
. If more than the maximum number of objects is identified (32767 objects), an error occurs and no entries are received. This restriction is ignored if *ALLFILE is specified or no objects are specified.
. When journal caching is being used, entries that are in the cache are not returned.
Examples:
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.
Example 4: Receiving Journal Entries for Data Area, Data Queue, and Integrated File System Objects
RCVJRNE JRN(LIBPROD/PRODJRN) EXITPGM(RCVLIB/PGMA)
OBJ((APPLIB/D1 *DTAARA) (APPLIB/D2 *DTAQ)
(APPLIB/D3 *FILE *NONE)) OBJPATH((¡¯/mydirectory¡¯))
SUBTREE(*YES) TOENT(*LAST) ENTFMT(*JRNENTFMT)
JRNENTFMT(RJNE0200)
This command receives journal entries from the journal receiver currently attached (when journal entries are starting to be received) to journal PRODJRN in library LIBPROD 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(*ENTFMT) Journal Entry Format for ENTFMT(*JRNENTFMT) when JRNENTFMT(RJNE0200) is specified¡å table at the end of the NULLINDLEN parameter description. Only entries associated with the specified objects are converted. These objects are a data area in library APPLIB called D1, a data queue in library APPLIB called D2, and a database file D3 in library APPLIB, as well as the directory ¡¯/mydirectory¡¯ and all directories, stream files, and symbolic links within that directory or one of its subdirectories.