Delete journal receivers

Journal receivers can quickly use a lot of auxiliary storage space. Therefore an important journal management task is to delete journal receivers after you no longer need them.

Related concepts
Journal message queue
Manual versus system journal-receiver management
Automatic deletion of journal receivers
Work with pointers in journal entries
Journal receiver management with remote journals
Related tasks
Inactivate the replication of journal entries to a remote journal
Delete journals
Recover a damaged journal receiver
Related reference
QIBM_QJO_DLT_JRNRCV exit point

How to determine whether to delete a journal receiver

When you are determining whether to delete a journal receiver, consider the following:

  • Journal receivers you need for recovery.
  • Journal receivers you do not need for recovery.
  • Where the journal receiver is in the receiver chain.

Journal receivers you need for recovery

Do not delete a journal receiver that has not been saved if you need that journal for recovery. Any journal receiver that you need to perform an apply or remove journaled changes operation is needed for recovery.

Attention: Use care when you delete journal receivers if you use save-while-active operations to save objects before they reach a commitment boundary. Ensure that you save the journal receivers before you delete them. If an object is saved before it reaches a commitment boundary it can have partial transactions. If you need to restore objects with partial transactions, you must have access to the journal receivers that were attached during the partial transactions to avoid data loss.

To determine if a journal receiver has been saved, in iSeries™ Navigator, right-click the journal receiver, and select Properties. If the Saved field shows no date, then you have not saved the journal receiver.

If you have saved the journal receiver, but the journaled objects are not saved, then you still need that journal receiver for recovery. If you have space on your system, wait to delete journal receivers until it is unlikely that you need them for a recovery. (You saved the journaled object). Restoring journal receivers before applying or removing journaled changes may significantly increase your recovery time.

Although it is not recommended, the system does not prevent you from deleting a receiver you detached and is not saved or that is required to provide adequate recovery. If you try to delete a journal receiver that was once attached but has not been saved, the system issues an inquiry message. You can then continue or cancel the delete operation. You can use the system reply list to specify the reply the system is to send for this inquiry message (rather than explicitly responding to each inquiry message).

Journal receivers you do not need for a recovery

Start of changeIf you are journaling only for access path protection or commitment control, most likely you do not need the journal receivers to recover journaled changes. You do not need to save these journal receivers before deleting them.End of change

To make your journaling tasks easier, you can even automate the deletion of these journal receivers by specifying the following:

  • Specify system journal-receiver management.
  • Specify automatic deletion of journal receivers.

Start of changeWhen you specify automatic deletion of journal receivers, the system does not send a message when it deletes a journal receiver. By specifying automatic deletion for journal receivers, you indicate that you do not need the journal receivers for user recovery.End of change

Where the journal receiver is in the receiver chain

To ensure logical recovery, the system does not allow you to delete a journal receiver from the middle of the receiver chain unless one of the following conditions exists:

  • The journal is using automatic deletion of journal receivers.
  • The journal is a remote journal.

Start of changeHowever, if a journal receiver is damaged, you can delete it from the middle of the chain. If an attached journal receiver is damaged, you must perform a change journal operation to detach the damaged receiver before you can delete it.End of change

Rules for deleting journal receivers

The rules for deleting journal receivers are as follows:

  • You cannot delete a journal receiver that is attached to a local journal. You must perform a change journal operation to detach a journal receiver before you delete it.
  • You must delete journal receivers in the same order they were attached to a journal.
  • You can delete a damaged or inoperable receiver regardless of the previous restriction. However, if an attached receiver is damaged, you must detach it before you delete it.
  • You cannot delete a journal receiver that is attached to a remote journal if the remote journal has a journal state of active. If you attempt to delete a receiver that is attached to a remote journal, the system sends the inquiry message CPA705E. The results of the reply to the message are the same as those that occur with message CPA7025.

Procedure for deleting journal receivers

Proceed as follows:
  1. In the iSeries Navigator window, expand the system you want to use.
  2. Expand Databases.
  3. Expand the database that you want to work with and Schemas.
  4. Click the schema you want to work with.
  5. Right-click the journal receiver you want to delete and click Delete.
  6. At the Confirm Object Deletion dialog click Delete.

You can also use the Delete Journal Receiver (DLTJRNRCV) command to delete journal receivers. If you use the DLTJRNRCV command, an exit point is available to use with an exit program to help automate journal receiver deletion.

Exit point for the DLTJRNRCV command

One example of using this exit point is a situation where your application is using the data in the journal receiver. The application is dependent on the journal receiver being present until your application processing is complete. By registering an exit program with the QIBM_QJO_DLT_JRNRCV exit point, the program will be called every time a journal receiver is deleted from the system. If your program determines that your application is not yet done with the receiver, it can indicate that the journal receiver is not eligible for deletion.

If you must delete the receiver regardless of what an exit program indicates, you can specify *IGNEXITPGM for the DLTOPT parameter on the DLTJRNRCV command. This parameter value requests that any user exit programs that are registered for QIBM_QJO_DLT_JRNRCV exit point be ignored.

You can also use the following values for the DLTOPT parameter:

*IGNTGTRCV
Ignore target receiver. If you specify this value, the system does not verify that all remote journals that are associated with this journal, and are immediately downstream on a target system, have full copies of this journal receiver. The delete operation will continue, even if a remote journal does not have a full copy.
*IGNINQMSG
Ignore inquiry message. Inquiry message CPA7025 will not be presented, even if this receiver has not been fully saved. Also, inquiry message CPA705E is not presented to the user even if the receiver is attached to a remote journal. The delete operation continues.