Many of us use the i/OS journaling facility to log changes to database files, IFS files, data areas, and data queues. But beware that it takes a lot of planning to develop and implement a solid journaling strategy. You need to determine what libraries are involved, what object types to journal, and which applications are dependent on journaling before getting started.
And after implementing your journaling plan, how do you ensure that your implementation remains uncorrupted and that you are always journaling the correct files? What if someone re-created a database file, but forgot to start journaling the file? What if during maintenance someone stopped journaling a critical data area? What if a restore causes your journaling implementation to get corrupted?
Well, here's a command you can use as your daily journal integrity check: PRTJRNRPT (Print Journal Report) will list the journaled and non-journaled objects in a library.
This command allows you to specify a library name (e.g., *LIBL or *CURLIB), a list of journaled or non-journaled objects, an object type or types, and the report order (e.g., Object Order or Library/Object order).
Using the command will submit a batch job that will print the journal report. The batch job attributes are based upon the Job Description and Output Queue parameters.
Print Journal Report (PRTJRNRPT)
Type choices, press Enter.
Object library ....... MYLIB Name, *LIBL, *CURLIB...
Object type ......... *ALL *ALL, *FILE, *DTAQ, *DTAARA
Report type ......... *NOTJRN *JRN, *NOTJRN
Printing order ....... *LIBOBJ *LIBOBJ, *OBJ, *JRNLIB...
Job description ...... *USRPRF Name, *USRPRF
Library .......... ________ Name, *LIBL, *CURLIB
Output queue ......... *CURRENT Name, *CURRENT, *JOBD, *USRPRF
Library .......... ________ Name, *LIBL, *CURLIB
The following source code included is:
CBX943H PNLGRP Print Journal Report CBX943V CLP Print Journal Report - VCP CBX943X CMD Print Journal Report CBX9431 CLP Print Journal Report - CPP CBX9432 RPGLE Print Journal Report - CPP
See each source member for compile instructions and see the help panel group for additional documentation.
You can download a zip file containing all the source code here.