Command reference / db
CHGJRN
Change Journal
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, and other attributes of the specified journal. The command allows one journal receiver to be attached to the specified journal, replacing the previously attached journal receiver. The sequence numbering of journal entries can be reset when the receiver is changed.
Allowed environments: *ALL.
Positional parameters: 2.
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 (not previously 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 not yet forced to auxiliary storage, or if any commit control changes are pending.
- If the library containing the journal is on an independent ASP, the journal receiver specified must be on an independent ASP in the same ASP group.
Parameters
JRN
Journal
Specifies the name and library of the journal for which journal receivers or operational attributes are being changed. This is a required parameter.
*LIBL- All libraries in the library list for the current thread 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, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Journal
Journal
Library
Library
Suggested / special values:
*LIBL, *CURLIB
JRNRCV
Journal receiver
Specifies which journal receiver to attach to the specified journal. This parameter cannot be specified for remote journals.
*SAME- The value does not change; the currently attached journal receiver remains attached.
*GEN- The journal receiver is created by the system and then attached to the specified journal, with the same attributes, owner, authorities, audit level, and library as the currently attached receiver.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Journal receiver
Journal receiver
Suggested / special values:
*SAME, *GEN
Library
Library
Suggested / special values:
*SAME, *GEN, *LIBL, *CURLIB
SEQOPT
Sequence option
Specifies whether the journal sequence number is continued from the currently attached journal receiver or reset to 1 in the newly attached journal receiver. This parameter cannot be specified for remote journals.
Allowed values:
*CONT, *RESET
*CONT- The journal sequence number of the next journal entry created is one greater than the sequence number of the last journal entry in the currently attached journal receiver.
*RESET- The journal sequence number of the first journal entry in the newly attached journal receiver is reset to 1.
MSGQ
Journal message queue
Specifies the qualified name of the message queue associated with the journal. A message is sent to this queue when an attached journal receiver's threshold is surpassed or when other journal events occur.
Suggested / special values:
*SAME
*SAME- The value does not change.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Journal message queue
Journal message queue
Suggested / special values:
*SAME
Library
Library
Suggested / special values:
*SAME, *LIBL, *CURLIB
MNGRCV
Manage receivers
Specifies how the changing of journal receivers is managed. This parameter cannot be specified for remote journals.
Allowed values:
*SAME, *SYSTEM, *USER
*SAME- The value does not change.
*SYSTEM- The system manages the changing of journal receivers. When an attached journal receiver reaches its size threshold, the system detaches it and creates and attaches a new journal receiver.
*USER- The user manages the changing of journal receivers by issuing the CHGJRN command to attach a new receiver.
DLTRCV
Delete receivers
Specifies whether the system deletes journal receivers when they are no longer needed. This parameter can be specified only if MNGRCV(*SYSTEM) is specified, or if the journal currently has the MNGRCV(*SYSTEM) attribute, or if the journal is a remote journal.
Allowed values:
*SAME, *NO, *YES
*SAME- The value does not change.
*NO- The journal receivers are not deleted by the system.
*YES- The journal receivers are deleted by the system when they are no longer needed.
RCVSIZOPT
Receiver size options
Specifies the options that affect the size of the receiver attached to the journal. This parameter cannot be specified for remote journals.
Allowed values:
*SAME, *SYSDFT, *NONE, *RMVINTENT, *MINFIXLEN, *MAXOPT1, *MAXOPT2, *MAXOPT3
*SAME- The value does not change.
*SYSDFT- The system uses the current recommended values, currently equivalent to *MAXOPT2 and *RMVINTENT.
*NONE- No options affect the size of the journal entries. The receiver can have a maximum size of approximately 2 gigabytes.
*RMVINTENT- The size of the receiver is reduced by automatic removal of internal entries required only for IPL or ASP vary-on recovery when no longer required.
*MINFIXLEN- The size of journal entries is reduced by automatic removal of fixed-length data not required for recovery purposes.
*MAXOPT1- The receiver can have a maximum size of approximately one terabyte and a maximum sequence number of 9,999,999,999, with a maximum journal entry size of 15,761,440 bytes.
*MAXOPT2- The receiver can have a maximum size of approximately one terabyte and a maximum sequence number of 9,999,999,999, with a maximum journal entry size of 4,000,000,000 bytes.
*MAXOPT3- The receiver can have a maximum size of approximately one terabyte and a maximum sequence number of 18,446,744,073,709,551,600, with a maximum journal entry size of 4,000,000,000 bytes.
JRNSTATE
Journal state
Specifies whether journal entries are allowed to be deposited into the journal. Values *ACTIVE, *INACTIVE, and *STANDBY are only valid when JRNRCV(*SAME) is specified.
Allowed values:
*SAME, *ACTIVE, *INACTIVE, *STANDBY
*SAME- The value does not change.
*ACTIVE- All journal entries are allowed to be deposited into the journal. This value cannot be specified for remote journals.
*INACTIVE- This state only applies to remote journals. No entries are being received from the source system. When changed to *ACTIVE, outstanding entries will be sent.
*STANDBY- Most journal entries are not deposited into the journal. If an attempt is made to deposit an entry, there will be no errors. Using commitment control is not allowed in *STANDBY state.
TEXT
Text 'description'
Specifies the text that briefly describes the journal.
Suggested / special values:
*SAME, *BLANK
*SAME- The text does not change.
*BLANK- The text is replaced by blanks.
Examples
CHGJRN JRN(JRNLA) JRNRCV(RCV10) SEQOPT(*RESET)
Detaches the currently attached journal receiver from journal JRNLA. Journal receiver RCV10 is attached to JRNLA. Because SEQOPT(*RESET) is specified, the first journal entry in RCV10 has a sequence number of one.
CHGJRN JRN(JRNLA) JRNRCV(*GEN) THRESHOLD(1500000)
Detaches the currently attached journal receiver from JRNLA. A new journal receiver is created and attached with the same library, owner, authority, and auditing level as the detached receiver, and a threshold of approximately 1500000 kilobytes.
CHGJRN JRN(LIBY/JRN) JRNRCV(LIBX/RCV0001) MNGRCV(*SYSTEM) DLTRCV(*YES) RCVSIZOPT(*MAXOPT2) MNGRCVDLY(10) DLTRCVDLY(30)
Detaches the current receiver from journal JRN, attaches RCV0001 from LIBX, enables system-managed receiver changing and deletion, allows up to 1 TB receiver size with sequence numbers up to 9,999,999,999, and sets retry delays of 10 and 30 minutes.
CHGJRN JRN(QGPL/DBJRN) JRNRCV(*GEN) JRNOBJLMT(*MAX10M)
Changes journal DBJRN in QGPL to allow up to 10,000,000 objects to be journaled to it and attaches a new generated receiver.
Generated from os/cl/catalog/CHGJRN.json and os/cl/help/CHGJRN.json.