IBM i journals seem primarily designed for recovery and replication.
We can display or print contents of journal (DSPJRN) or apply changes back to database in case of a restore (APYJRNCHG).
examples:
Display Journal:
DSPJRN JRN(MYJRN) FILE((CUST))
JRNCDE((R)) OUTPUT(*OUTFILE)
OUTFILFMT(*TYPE4) OUTFILE(QTEMP/JRN_OUT)
ENTDTALEN(*CALC)
Apply Journal Changes
APYJRNCHG JRN(journal-library/journal-name) FILE(file-library/file-name)
RCVRNG(receiver-range-library/receiver-name) FROMENTDT(yymmdd) TOENTDT(yymmdd)
Reading or querying journal data is not very user friendly as ‘data’ is stuffed into a single field.
If we want to use journals to answer questions like “who changed this record last week” or “what programs are frequently updating this file”, what techniques, tools could we use?