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 following command: DSPFD FILE(P6PRDBDB00/P6OIDPF)
Got the journaled name and library but I dont know how to view it for the object P6OIDPF?
I did go to library #MXJRN and whent to P6 and got the following :
How can I view the object P6OIDPF data? Or a command to view it? Theres a lot of objects in P6.
Follow the next sequence:
Get the data file length and use it in the next command
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.
the join is not important
Select all the fields but JOESD.
Then just copy from the outfile to the jrn file with replace and *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 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
The command to use is
DSPJRN JRN(#MXJRN/P6) FILE((P6PRDBDB00/P6OIDPF))
You can Filter on start and end date time.