The Retrieve Journal Information (QjoRetrieveJournalInformation) API provides a wealth of information about journals, including journal receiver directories, journaled objects, and associated remote journals. Because remote journals to a great extent are employed in solutions providing replication and disaster recovery facilities, it has increasingly become vital to get access to current information detailing remote journal configuration and status. This APIs by Example article shows how to exploit the QjoRetrieveJournalInformation in such an endeavor.
The code associated with today’s article delivers the Retrieve Remote Journal Attribute (RTVRMTJRNA) command, allowing you to access critical information about the remote journals associated with a specified local journal. I’ve also included sample code showing how to interrogate the current state of all remote journals servicing a local journal, and for any remote journals not currently active to send warning messages or e-mails and ensure they get attention. As a part of the notification methods included in the sample program, I also present a new, native Send SMTP Email (SNDSMTPEMM) command, which IBM currently has in the works, and is making available to release IBM i 6.1 and 7.1 by means of PTFs.
Download the save file containing the source code.