Track journaling pf on ibm iseries AS/400 machine for os user?

Posted on 2007-07-25
Last Modified: 2010-08-05
os/400 ibm iseries server to tack user changes on pf
Question by:SunshineVK
    LVL 14

    Expert Comment

    what is it you want? the heading is not very helpful!

    You can create a journal receiver (CRTJRNRCV)
    Then create a journal CRTJRN specifying the receiver.
    Then attach the files to the journal STRJRNPF.

    you then use the DSPJRNcommand to show what has changed.

    if you want to show who has looked at records, added as well as changed them then you can use a database trigger and write your own audit.

    LVL 4

    Author Comment

    Hello Dave,
    Thanks for your immediate response.
    We already have a journaled environment on the iSeries. What we are looking out is for a method to read the Journal entries. I have generated a couple of reports with the command DSPJRN and CMPJRNIMG, but from the data displayed in  "ÉNTRY SPECIFIC DATA" column, we are not able to make out which particular field in the physical file is updated / deleted and also some of the data is in the formn
     of junk characters.
    Is there a way to generate a report in a more readable format without using a third party tool as this is an audit requirement? Does using the command RTVJRNE in a CL prog help?  
    LVL 14

    Accepted Solution

    What I have done in the past is.

    Use the DSPJRN file to create an output file of the records you want in this example I am using "My_Jrn_File"

    Use SQL to extract the data element of the file.
    create table My_Jrn_Data as (select JOESD from My_Jrn_File)  with data  

    then remove the field from the outfile

    They create a copy of the database the records were created from, I use cpyf with the CRTFILE(*Yes) parm.
    Cpyf Jrn_Db tofile(Copy_Jrn_Db) mbropt(*replace) crtfile(*yes) torcd(1)

    finally copy the myJRNdATA to the file created above
    Cpyf  My_Jrn_Data tofile(Copy_Jrn_Db) mbropt(*replace) Fmtopt(*Nochk)

    you can then link the data to the in My_Jrn_File & Copy_Jrn_Db by RRN in sql
    select * from My_Jrn_File A,  Copy_Jrn_Db B where rrn(a)=rrn(b).

    LVL 26

    Expert Comment


    Also review this EE item closely:

    It's a little more complex than Dave's example, but it might help illuminate what can be done. If the first couple of preparatory steps are done, you can create a general proc that will automate this for any journaled table.

    LVL 4

    Author Comment

    Thanks Tom & Dave.
    Problem was resolved using Daves suggestion.
    Thanks for inputs Tom.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now