Change Remote Journal (CHGRMTJRN)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

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:

Top

Parameters

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
Top

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.
Top

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.
Top

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.
Top

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.
Top

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.
Top

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.
Top

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.
Top

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.
Top

Examples

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.

Top

Error messages

*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.
Top