IBM Support

Automate journal receiver (*JRNRCV) deletion

Question & Answer


Is there a way to have the IBM i clean up and delete journal receivers that are no longer needed?  Is there an example available on how to do this?


Journals that were created with "Delete receivers" set to *NO has the following meaning:

                 Delete Receivers - Help                  
Indicates whether the system attempts to delete detached journal receivers associated with this journal when they are no longer needed for IPL recovery.                    

*NO - The system does not attempt to delete detached journal receivers associated with this journal.     

If the receivers are never saved and deleted, they will simply add up and consume disk space.


To automate the deletion, you can create a program that looks at save date or when the journal receiver was detached.  CL commands DSPOBJD or DSPJRNRCVA can be used to see whether a journal receiver is saved. DSPJRNRCVA also shows that whether it has been detached. You can also use system APIs or system table functions to see similar attributes.  

There are code examples available in library QMGTOOLS that are proved as is.  Use PDM to review the source.

- Issue STRPDM

- Select option 3

- Put in file QMGDBSQL in library QMGTOOLS


NOTE: See the following document if you do not have QMGTOOLS or if you need to update the version to see these examples -

Also, the following article details a method for automated journal receiver cleanup that uses an exit point program.

[  ]  Automate journal receiver deletion

Taken from the above article:

"Are you tired of having to manually delete unneeded journal receivers from your system?
Don't have time to write a program to search through your libraries and identify those journal receivers that are no longer needed for recovery and delete them? Don't have a high-availability Business Partner to manage journal receivers for you? Wouldn't it be nice to have the system automatically keep a certain number of days' worth of saved receivers around before deleting them? IBM i has the facilities to help you manage journal receivers automatically, thereby reducing consumption of DASD and shortening the time it takes to back up your system.

In this article, we'll take a look at an approach to automate the deletion of unneeded journal receivers by using the Delete Receivers option on the CHGJRN or CRTJRN commands in conjunction with the QIBM_QJO_DLT_JRNRCV registered exit point. A sample ILE C program is provided to illustrate one way to make use of this exit point to govern how many days' worth of saved receivers should be kept around before they are deleted.

For more information to help you decide whether system-managed journal management is right for you, see the IBM® Redbooks® Striving for Optimal Journal Performance on DB2 Universal Database for iSeries, especially pages 87 to 89."

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
21 July 2021