Change Remote Journal (CHGRMTJRN)
The Change Remote Journal (CHGRMTJRN) command is used to change the journal state for remote journals.
This command is used on the source system for a remote journal that is associated with a source-system journal, to change the state of the remote journal from *ACTIVE to *INACTIVE or from *INACTIVE to *ACTIVE. A journal state of *ACTIVE for a remote journal indicates that journal entries can be received from the associated journal on the source system. A journal state of *INACTIVE for a remote journal indicates that the journal is not ready to receive journal entries from a source journal. This command also allows additional attributes that are associated with the journal state to be set.
The Change Journal (CHGJRN) command can be used to modify the other journal attributes of remote journals, such as the journal message queue, deleting receivers, and text.
Restrictions:
- A user profile must exist on the target system by the same name as the user profile that is running this command on the source system. This restriction is irrespective of the selected communications protocol.
- Synchronous delivery mode is not supported when a remote journal is specified for the source system journal name parameter.
- The journal state of the remote journal to be activated cannot already be *ACTIVE.
- The journal state of the remote journal to be inactivated cannot already be *INACTIVE.
- If the remote journal state is *CTLINACT, then the remote journal cannot be inactivated by specifying a INACTOPT(*CNTRLD).
- The remote journal to be activated cannot already be replicating journal entries to other remote journals.
- A journal receiver that was one of a pair of dual receivers cannot be replicated.
- A journal receiver that was never attached to a journal after Version 4 Release 2 Modification 0 has been installed cannot be replicated because all of the required information is not contained within the receiver.
- The specified relational database directory entry (RDB) must meet the following rules:
- The communications protocol must be one of the remote journal function supported protocols.
- The remote location name in the RDB cannot refer to the *LOCAL database.
- The RDB cannot use an application requester driver program (*ARDPGM) to locate the target system.
Keyword |
Description |
Choices |
Notes |
RDB |
Relational database |
Name |
Required, Positional 1 |
SRCJRN |
Source journal |
Qualified object name |
Required, Positional 2 |
Qualifier 1: Source journal |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
TGTJRN |
Target journal |
Single values: *SRCJRN Other values: Qualified object name |
Optional |
Qualifier 1: Target journal |
Name |
Qualifier 2: Library |
Name |
JRNSTATE |
Journal state |
*SAME, *ACTIVE, *INACTIVE |
Optional |
DELIVERY |
Delivery |
*ASYNC, *SYNC |
Optional |
STRJRNRCV |
Starting journal receiver |
Single values: *ATTACHED, *SRCSYS Other values: Qualified object name |
Optional |
Qualifier 1: Starting journal receiver |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
SNDTSKPTY |
Sending task priority |
1-99, *SYSDFT |
Optional |
INACTOPT |
How to make inactive |
*CNTRLD, *IMMED |
Optional |
Relational database (RDB)
Specifies the name of the relational database directory entry that contains the remote location name of the target system. This name should match the name of the *LOCAL relational database directory entry on the target system.
This is a required parameter.
- relational-database-entry
- Specify a maximum of 18 characters for the name of the relational database directory entry.
Source journal (SRCJRN)
Specifies the name of the source journal that is associated with the remote journal that is being changed, and the library in which it resides.
This is a required parameter.
Qualifier 1: Source journal
- source-journal-name
- Specify the source journal that is associated with the remote journal that is being changed.
Qualifier 2: Library
- *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 thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- library-name
- Specify the name of the library in which the journal resides.
Target journal (TGTJRN)
Specifies the remote journal on the target system that is being changed.
Single values
- *SRCJRN
- The target journal name is exactly the same as the source journal name.
Qualifier 1: Target journal
- target-journal-name
- Specify the name of the target journal that is being changed.
Qualifier 2: Library
- library-name
- Specify the name of the library in which the journal resides.
Journal state (JRNSTATE)
Specifies whether the remote journal is ready to receive journal entries from a source journal.
- *SAME
- The value does not change.
- *ACTIVE
- The remote journal is ready to receive journal entries from a source journal.
- *INACTIVE
- The remote journal is not ready to receive journal entries from a source journal.
Delivery (DELIVERY)
Specifies whether journal entries are replicated synchronously or asynchronously when the remote journal is activated.
Note: This parameter is only valid when JRNSTATE(*ACTIVE) is specified.
- *ASYNC
- Journal entries are replicated asynchronously.
- *SYNC
- Journal entries are replicated synchronously.
Starting journal receiver (STRJRNRCV)
The journal receiver where the replication of journal entries from the source system to the target system starts.
Note: This parameter is only valid when JRNSTATE(*ACTIVE) is specified.
- *ATTACHED
- The replication of journal entries starts with the journal receiver that is currently attached to the remote journal on the target system. The journal entries are replicated from the corresponding journal receiver that is associated with the journal on the source system. The replication starts with the journal entries that follow the last journal entry that currently exists in the attached journal receiver on the target system. If the remote journal on the target system does not have an attached journal receiver, the journal receiver that is currently attached to the journal on the source system is created on the target system and attached to the remote journal on the target system. Then journal entries are replicated starting with the first journal entry in the journal receiver that is currently attached to the journal on the source system. If the journal on the source system does not have an attached journal receiver, which is only possible in the case of a remote journal that is associated with another remote journal, no journal entries can be replicated and an error is returned.
- *SRCSYS
- The replication of journal entries starts with the journal receiver that is currently attached to the journal on the source system. If the corresponding journal receiver exists and is attached to the remote journal on the target system, journal entries are replicated starting with the journal entries that follow the last journal entry that currently exists in the attached journal receiver on the target system. Otherwise, if the corresponding journal receiver exists but is not attached to the remote journal on the target system, no journal entries can be replicated and an error is returned. If the corresponding journal receiver does not exist on the target system, the journal receiver is created on the target system and attached to the remote journal on the target system. Then journal entries are replicated starting with the first journal entry in the journal receiver that is currently attached to the journal on the source system. If the journal on the source system does not have an attached journal receiver, which is only possible in the case of a remote journal that is associated with another remote journal, no journal entries can be replicated and an error is returned.
- starting-journal-receiver-name
- Specify the journal receiver where the replication of journal should start. If the corresponding journal receiver exists and is attached to the remote journal on the target system, journal entries are replicated starting with the journal entries that follow the last journal entry that currently exists in the attached journal receiver on the target system. Otherwise, if the corresponding journal receiver exists but is not attached to the remote journal on the target system, no journal entries can be replicated and an error is returned. If the corresponding journal receiver does not exist on the target system, then the journal receiver is created on the target system and attached to the remote journal on the target system. Then journal entries are replicated starting with the first journal entry in the specified journal receiver on the source system.
The name of the starting journal receiver can be qualified by one of the following library values:
- *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 thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- name
- Specify the name of the library to be searched.
Sending task priority (SNDTSKPTY)
Specifies the priority of the sending task on the source system for asynchronously maintained remote journals. The priority is a value from 1 (highest priority) through 99 (lowest priority), which represents the importance of the task when it competes with other tasks for machine resources. This value represents the relative (not absolute) importance of the task.
Note: This parameter is only valid when JRNSTATE(*ACTIVE) and DELIVERY(*ASYNC) are specified.
- *SYSDFT
- The system chooses a value for the sending task priority that is higher than the highest priority a user may specify (higher than priority 1).
- sending-task-priority
- Specify a value between 1 and 99 for the priority of the sending task on the source system.
How to make inactive (INACTOPT)
Specifies how the replication of journal entries should be ended when the remote journal is inactivated.
Note: This parameter is only valid when JRNSTATE(*INACTIVE) is specified.
- *CNTRLD
- A controlled inactivate of journal entry replication is performed. A controlled inactivate means that the system should replicate all journal entries already queued to be sent from the source system to the target system before inactivating the remote journal. No additional journal entries are queued after a request to perform a controlled inactivate. A controlled inactivate is not possible when a journal is in catch-up, or when it is being synchronously maintained. In both of these cases, the request to perform a controlled inactivate is implicitly changed by the system to an immediate inactivate request.
- *IMMED
- An immediate inactivate of journal entry replication is performed. An immediate inactivate means that the system will not continue to replicate any journal entries that are already queued before inactivating the remote journal.
Example 1: Activating a Remote Journal to be Maintained Asynchronously
CHGRMTJRN RDB(CHICAGO)
SRCJRN(LCLLIB/JOURNAL1) TGTJRN(RMTLIB/JOURNAL1)
JRNSTATE(*ACTIVE) DELIVERY(*ASYNC)
SNDTSKPTY(*SYSDFT)
This command activates remote journal JOURNAL1 in library RMTLIB so that journal entries will be replicated from source journal JOURNAL1 in library LCLLIB to remote journal JOURNAL1 in library RMTLIB. The replication will occur asynchronously, and the system will set the priority of the sending task.
Example 2: Inactivating a Remote Journal
CHGRMTJRN RDB(CHICAGO) SRCJRN(LCLLIB/JOURNAL1)
TGTJRN(RMTLIB/JOURNAL1)
JRNSTATE(*INACTIVE) INACTOPT(*IMMED)
This command inactivates remote journal JOURNAL1 in library RMTLIB so that journal entries will no longer be replicated from source journal JOURNAL1 in library LCLLIB to remote journal JOURNAL1 in library RMTLIB. The inactivation will occur immediately.
*ESCAPE Messages
- CPF69A2
- State of journal &1 in &2 not changed.
- CPF69A3
- State of journal &1 in &2 not changed.
- CPF694D
- Unexpected journal receiver &8 found.
- CPF694F
- Communications failure. Reason code &10.
- CPF696F
- State of journal &1 in &2 not changed.
- CPF697A
- State of journal &1 in &2 not changed.
- CPF697B
- State of journal &1 in &2 not changed.
- CPF697C
- State of journal &1 in &2 not changed.
- CPF697D
- State of journal &1 in &2 not changed.
- CPF697E
- State of journal &1 in &2 not changed.
- CPF697F
- State of journal &1 in &2 not changed.
- CPF6973
- Systems or journal environments not compatible.
- CPF6974
- State of journal &1 in &2 not changed.
- CPF698A
- State of journal &1 in &2 not changed.
- CPF698B
- Unexpected journal receiver attached to &1.
- CPF698C
- State of journal &1 in &2 not changed.
- CPF698D
- Journal &1 not a remote journal.
- CPF698E
- Journal &1 not associated with source journal.
- CPF698F
- State of journal &1 in &2 not changed.
- CPF6982
- Relational database directory entry &1 not valid.
- CPF699A
- Unexpected journal receiver &8 found.
- CPF699E
- State of journal &1 in &2 not changed.
- CPF6993
- State of journal &1 in &2 not changed.
- CPF6994
- State of journal &1 in &2 not changed.
- CPF6995
- Unexpected journal receiver &8 found.
- CPF6996
- Replication of journal entries ended.
- CPF6997
- Unexpected journal receiver &8 found.
- CPF6998
- State of journal &1 in &2 not changed.
- CPF6999
- State of journal &1 in &2 not changed.
- CPF70A3
- Remote journal &1 in &2 not changed.
- CPF70DB
- Remote journal function failed.
- CPF70D9
- Changing journal state not allowed. Reason code &3.
- CPF701B
- Journal recovery of an interrupted operation failed.
- CPF9801
- Object &2 in library &3 not found.
- CPF9802
- Not authorized to object &2 in &3.
- CPF9803
- Cannot allocate object &2 in library &3.
- CPF9810
- Library &1 not found.
- CPF9814
- Device &1 not found.
- CPF9820
- Not authorized to use library &1.
- CPF9830
- Cannot assign library &1.