CL Command Reference - CHGJRN
CL Command List > CHGJRN Reference
Description:
The Change Journal (CHGJRN) command changes the journal receiver, the journal message queue, the manage receiver attribute, the delete receiver attribute, the receiver size options, the journal state, allowing minimized entry specific data, journal caching, the journal receivers threshold, the journal object limit, the journal recovery count, or the text associated with the specified journal. The command allows one journal receiver to be attached to the specified journal. This replaces the previously attached journal receiver. The newly-attached journal receiver begins receiving journal entries for the journal immediately.
The sequence numbering of journal entries can be reset when the receiver is changed. If the sequencing is not reset, an informational message is sent indicating the first sequence number in the newly attached receiver. If RCVSIZOPT(*MAXOPT1 or *MAXOPT2) is in effect for the journal, an informational message (CPF7019) is sent to the system operator recommending that the sequence numbers be reset when the first sequence number is greater than 9,500,000,000. If RCVSIZOPT(*MAXOPT3) is in effect for the journal, an informational message (CPF7019) is sent to the system operator recommending that the sequence numbers be reset when the first sequence number is greater than 18,446,600,000,000,000,000. Otherwise, CPF7019 is sent when the first sequence number is greater than 2,000,000,000.
If *SAME is specified on the JRNRCV parameter, the currently attached journal receiver remains attached.
The journal receiver can be changed when these journal functions are in progress: comparing images, displaying journals, receiving or retrieving journal entries, applying or removing journal changes, working with journal attributes, restoring journal receivers, or displaying journal receiver attributes.
Restrictions:
. To use this command, the user must be signed on as QPGMR, QSYSOPR, or QSRV, or have *ALLOBJ authority.
. The receiver specified must be created before issuing this command, and it must be empty (that is, the receiver must not have been previously attached to a journal or have been in the process of being attached to a journal).
. No more than one journal receiver can be attached to the journal at any specific time.
. Resetting of sequence numbers is not valid if JRNRCV(*SAME) is specified, if any objects being journaled contain changes that have not yet been forced to auxiliary storage, or if any commit control changes associated with the journal are pending. When the maximum sequence number is reached, an error message is sent (entry not journaled) and all subsequent operations that require journaling fail.
. If one of the *MAXOPT values from the RCVSIZOPT parameter is not to be in effect for the journal, the maximum threshold value that can be specified for any journal receiver being attached is 1,919,999 kilobytes.
. SEQOPT(*RESET) must be specified if the journal currently has one of the *MAXOPT values for the RCVSIZOPT parameter in effect, and no *MAXOPT value is being specified as part of the CHGJRN request.
. If the library containing the journal is on an independent ASP then the journal receiver specified must be located on an independent ASP that is in the same ASP group as the journal¡¯s library. Likewise, if the library containing the journal is not on an independent ASP, then the journal receiver specified cannot be located on an independent ASP.
. RCVSIZOPT(*MINFIXLEN) and FIXLENDTA cannot be used for the system security audit journal QSYS/QAUDJRN. Journal entries in the security audit journal are required to contain all possible data that could be used for auditing purposes.
. SEQOPT(*RESET) must be specified if the journal currently has RCVSIZOPT(*MAXOPT3) in effect, and *MAXOPT3 is not being specified as part of the CHGJRN request.
. JRNOBJLMT(*MAX10M) is only valid if one of the *MAXOPT values was specified for the RCVSIZOPT parameter.
. JRNOBJLMT(*MAX10M), once specified for a journal, cannot be changed.
Examples:
Example 1: Detaching Journal Receiver and Resetting Sequence Numbers
CHGJRN JRN(JRNLA) JRNRCV(RCV10) SEQOPT(*RESET)
This command detaches the journal receiver currently attached to journal JRNLA (JRNLA is found by using the library search list *LIBL). Journal receiver RCV10 (found using the library search list *LIBL) is attached to journal JRNLA. Because SEQOPT(*RESET) is specified, the first journal entry in journal receiver RCV10 has a sequence number of one.
Example 2: Creating and Attaching a New Journal Receiver
CHGJRN JRN(JRNLA) JRNRCV(*GEN) THRESHOLD(1500000)
This command detaches the journal receiver currently attached to journal JRNLA. A new journal receiver is created and attached to journal JRNLA. The library, owner, authority, and auditing level of the new journal receiver is the same as that of the detached receiver. The name of the new receiver depends on the name of the detached receiver. (For example, if the receiver is named RCVJRNA, the new receiver is named RCVJRN0001. If the receiver is named RCVJRN0001, the new receiver is named RCVJRN0002.)
The first journal entry in the new journal receiver has a sequence number one greater than the last sequence number in the detached receiver. The new receiver will have a receiver size threshold of approximately 1500000 kilobytes.
Example 3: Changing to Use System Receiver Management
CHGJRN JRN(LIBY/JRN) JRNRCV(LIBX/RCV0001)
MNGRCV(*SYSTEM) DLTRCV(*YES)
RCVSIZOPT(*MAXOPT2) MNGRCVDLY(10) DLTRCVDLY(30)
This command detaches the journal receiver currently attached to journal JRN. The user previously created the journal receiver RCV0001 in library LIBX. This specified journal receiver is attached to the journal JRN. This new journal receiver will have a maximum size of approximately one terabyte. It will allow the sequence number to reach 9,999,999,999 and the maximum size of a journal entry that can be deposited in the journal receiver is 4,000,000,000 bytes. The first journal entry in the new journal receiver has a sequence number one greater than the last sequence number in the detached receiver. From this point on the system will manage attaching and detaching journal receivers. If the system cannot allocate an object during this process, it will wait 10 minutes and try again. From this point on, the system will also manage deleting the detached receivers. If the system cannot allocate an object while trying to delete the journal receiver it will wait 30 minutes and try again.
Example 4: Changing to Allow a Larger Object Limit
CHGJRN JRN(QGPL/DBJRN) JRNRCV(*GEN)
JRNOBJLMT(*MAX10M)
This command changes the journal DBJRN in library QGPL to allow up to 10,000,000 objects to be journaled to it. A new receiver is attached to the journal. The first entry in the new journal receiver has a sequence number one greater than the last sequence number in the detached receiver. After this change, more than 250,000 objects can be journaled to this journal.