Midrange Systems Design - IBM i5 tm Software
Display Journal |
Download Program Source |
This job displays journals so you can easily read your data (item number, quantity ...). IBMs command DSPJRN drops all of the before and after image data into 1 field, making it difficult to read.
DSPJRNS creates DDS that includes IBM fields (user date time...) and your files fields (item #, price, quantity...), compiles it, runs ibm's DSPJRN, then runs RUNQRY so you can find what you need..
General information about journals.
Journals take up a lot of room, therefore they should be cleaned up every night, keeping only a few days. The system allows you to put multiple files into 1 journal but that makes it slow to retrieve the information. If you keep only 1 file in 1 journal it is faster to retrieve the information. The journal and receiver must be placed in the data files library if you want to restore them or use the apply journal command.
Journaling a Physical file.
CRTJRNRCV JRNRCV(LIB/RCV) THRESHOLD(1900000) TEXT('XXXXXXXXX')
CRTJRN JRN(LIB/JRN) JRNRCV(LIB/RCV) MNGRCV(*SYSTEM)
STRJRNPF FILE(LIB/FILE) JRN(LIB/JRN)
Changing journal files.
CHGJRN JRN(EASTON/ITMSTR ) JRNRCV(*GEN) +
SEQOPT(*RESET)
MONMSG MSGID(CPF7018) EXEC(DO)
CHGJRN JRN(EASTON/ITMSTR ) JRNRCV(*N *GEN)
ENDDO
Finding a journal
WRKJRNRCV JRNRCV(*ALLUSR/*ALL) /* find the journal */
Viewing a journal file OR command jrnrcvdsp.
DSPJRN JRN(CMA90FIL/POJRN) FILE((CMA90FIL/STINV))
RCVRNG(*CURCHAIN) JRNCDE((R))
OUTPUT(*OUTFILE) OUTFILE(EASTON/STINVJRN) ENTDTALEN(*CALC)