How do you view journal data from a specified table? I want to see what happended to a table in a specified time frame.
I got info on the table by using the followin
The EXPJRNE utility from Tools/400 provides a higher level interface to the DSPJRN command.
You have system procedure DISPLAY_JOURNAL and DISPLAY_JOURNAL_ENTRY_INFO in last versions of DB2
DISPLAY_JOURNAL doc
Follow the next sequence:
Get the data file length and use it in the next command
DSPJRN JRN(JRNLIB/JRN)
FILE((FILELIB/DATAFILE *FIRST))
OUTPUT(*OUTFILE)
OUTFILFMT(*TYPE2)
OUTFILE(OUTFILELIB/OUTFILE)
ENTDTALEN(datafilelength)
Once you get the data with wrkqry create a joined table where you get all the outfile fields except the last one JOESD. Instead of JOESD, you get all the data fields.
Specify File Selections
Type choices, press Enter. Press F9 to specify an additional
file selection.
File . . . . . . . . . OUTFILE Name, F4 for list
Library . . . . . . *LIBL Name, *LIBL, F4 for list
Member . . . . . . . . *FIRST Name, *FIRST, F4 for list
Format . . . . . . . . *FIRST Name, *FIRST, F4 for list
File ID . . . . . . . A A-Z99, *ID
File . . . . . . . . . datafile Name, F4 for list
Library . . . . . . *LIBL Name, *LIBL, F4 for list
Member . . . . . . . . *FIRST Name, *FIRST, F4 for list
Format . . . . . . . . *FIRST Name, *FIRST, F4 for list
File ID . . . . . . . B A-Z99, *ID
the join is not important
Specify How to Join Files
Type comparisons to show how file selections are related, press Enter.
Tests: EQ, NE, LE, GE, LT, GT
Field Test Field
A.JOENTL EQ ANYFIELD
Select all the fields but JOESD.
Select and Sequence Fields
Type sequence number (0-9999) for the names of up to 500 fields to
appear in the report, press Enter.
Seq Field Text Len Dec
1 A.JOMBR Name of Member 10
1 A.JOCTRR Count or relative record number changed 10 0
1 A.JOFLAG Flag: 1 or 0 1
1 A.JOCCID Commit cycle identifier 10 0
1 A.JOUSPF User Profile 10
1 A.JOSYNM System Name 8
1 A.JOINCDAT Incomplete Data: 1 or 0 1
1 A.JOMINESD Minimized ESD: 0, 1, or 2 1
1 A.JORES Not used 18
A.JOESD Entry Specific Data - Variable contents 808
1 B.FIELD1 FIELD1 2
1 B.FIELD2 FIELD2 3 0
Then just copy from the outfile to the jrn file with replace and *nochk
CPYF FROMFILE(QTEMP/OUTFILE)
TOFILE(QTEMP/JRN)
MBROPT(*REPLACE)
FMTOPT(*NOCHK)
And that's it! In JRN you have all the journal data and the data file data formatted as in the original file.
The command to use is DSPJRN JRN(#MXJRN/P6) FILE((P6PRDBDB00/P6OIDPF))
You can Filter on start and end date time.