CHGRMTJRN (Change Remote Journal)

CHGRMTJRN Command syntax diagram

 

Purpose

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

 

Required Parameters

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

relational-database-entry: Specify a maximum of 18 characters for the name of the relational database directory entry.

SRCJRN
The name of the source journal that is associated with the remote journal that is being changed, and the library in which it resides.

The name of the source journal can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

source-journal-name: Specify the source journal that is associated with the remote journal that is being changed.

 

Optional Parameters

TGTJRN
The name of the remote journal on the target system that is being changed, and the library in which it resides.

*SRCJRN: The target journal name is exactly the same as the source journal name.

library-name/target-journal-name: Specify the target journal that is being changed.

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 remove journal is not ready to receive journal entries from a source journal.

DELIVERY
Whether journal entries are to be replicated synchronously or asynchronously when the remote journal is activated.

*ASYNC: Journal entries are to be replicated asynchronously.

*SYNC: Journal entries are to be replicated synchronously.

STRJRNRCV
The journal receiver where the replication of journal entries from the source system to the target system will start. The possible values follow:

*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:

The name of the starting journal receiver can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list 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, the QGPL library is used.

library-name: Specify the name of the library to be searched.

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.

INACTOPT
How the replication of journal entries should be ended when the remote journal is inactivated.

*CNTRLD: A controlled inactivate of journal entry replication should be 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 will be 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 will be implicitly changed by the system to an immediate inactivate request.

*IMMED: An immediate inactivate of journal entry replication should be performed. An immediate inactivate means that the system should not continue to replicate any journal entries that are already queued before inactivating the remote journal.

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

*SYSDFT: The system will choose a system default for the priority.

sending-task-priority: Specify a value between 1 and 99 for the priority of the sending task on the source system.

Examples for CHGRMTJRN

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.

Error messages for CHGRMTJRN

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