ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Journaling - Updates made to table not showing in journal? Or, am I misinterpreting?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Journaling - Updates made to table not showing in journal? Or, am I misinterpreting?

    Journal settings from the dspfd screen of the file i want to monitor:

    Journal images . . . . . . . . . . . . . . : IMAGES *BOTH
    Journal entries to be omitted . . . . . . . : OMTJRNE *OPNCLO
    Last journal start date/time . . . . . . . : 07/25/10 01:16:59

    Background Info:
    Lets call the physical file in question FOO. Lets call the specific field in question City. For some time now I have been receiving complaints from end users that the data in the City field is incorrect for many records in the physical file FOO. No problem, I happen to have a master file that I can update this field with to obtain the correct City field value for every record in file FOO. I proceed to update the file and record with the correct data.

    1 month passes. I start getting the same user complaints that the City field has incorrect data. I check the file and some of the values have changed again and become incorrect. The bad data is actually a phone number.

    I device a plan to watch the data change from correct to incorrect. I monitor the journal for any insert, update, delete, etc... that would indicate a change to the record. I write that info to a table for easy retrieval. I test my process by modifying various records in various ways like DFU, SQL, RPGLE, etc... Sure enough, my tests show up in my tracking table. I proceed to update table FOO record City with correct data. All the updates I make show up in my tracking table. Another month passes.

    Sure enough, the City field again is populated with phone numbers (bad data).

    Problem:
    There are no corresponding entries in my tracking table for updates made to cause the bad data.

    Question:
    Is it possible to modify the data in a table without causing journal entries?

    My thought is that we have a rogue program that is sitting somewhere, perhaps on the job scheduler, perhaps as a trigger on a table, that is updating this table FOO field City with the wrong data. Unfortunately our system is too large for this to be easily found thru the process of elimination.

    Please help :-)

  • #2
    Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

    it is not possible to update a table that is correctly journaled without leaving a trail.

    well checking a trigger would be quick...

    just do a
    Code:
     dspfd FOO
    page down a few times

    If trigger is there you should see something like:
    Trigger Description
    Trigger name . . . . . . . . . . . . . . . : TRG ARACUST_TA
    Trigger library . . . . . . . . . . . . . : LCPFIL
    Trigger state . . . . . . . . . . . . . . : STATE *ENABLED
    Trigger status . . . . . . . . . . . . . : *OPERATIVE
    Trigger event . . . . . . . . . . . . . . : TRGEVENT *UPDATE
    Trigger time . . . . . . . . . . . . . . : TRGTIME *AFTER
    Allow repeated change . . . . . . . . . . : ALWREPCHG *NO
    Trigger update condition . . . . . . . . : TRGUPDCND *CHANGE
    Program Name . . . . . . . . . . . . . . : PGM ARACUST_TA
    Library . . . . . . . . . . . . . . . . : LBIOBJ
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

      Thanks for the quick reply jamief. I should have clarified. There are no triggers on FOO. There may be triggers on other tables causing updates to FOO. In a sense, the update could be coming from anywhere, I can't figure out where.

      Comment


      • #4
        Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

        I should also say that I have done a FNDSTRPDM on all the source that is known to me and my team. We have no source that shows us updating that field in that file.

        Comment


        • #5
          Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

          Im still lost as to why you cant see the update in the journals..

          How are you viewing the Journals?
          do you own DBU?

          It sounds like to me that the file was compiled with LVLCHK 'N' with fields added.
          (not at the end of course) --

          and there is a program out there that has not been compiled to the new file.
          i think this might work



          jamie
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

            File is compiled with level check on.

            I don't know what the product DBU is.

            I am viewing the journals thru IBM's InfoSphere Change Data Capture software. On our system the programmers have very specific and segregated access. We do not have command line access and we are not able to work with the journals in any manner. We can request changes, but we can't directly interact with them, for security and SOX compliance.

            To answer your question, the InfoSphere product reads the journals and replicates the change information to a secondary system that is our sandbox. That is where i monitor the changes. It brings over the journal fields along with the data. It is a mirror product essentially.

            Our admin team that has direct access to the journals is not very savvy, unfortunately. Is there a command, query, methodolgy that I could pass on to them to run/follow and find a specific instance where FOO.city change from a valid entry to a phone number?

            I am rather confident that the InfoSphere product is picking up all the journal entries because the data in our mirror matches our source record for record. I just can't find how it is changing. The InfoSphere product doesn't provide the journal table for me to work with, I have to give it instructions to write to my monitoring table when an update, insert, delete is performed on table FOO.

            Basically I work on a very locked down system and don't have adequate admin support to locate the source of the problem.

            Comment


            • #7
              Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

              DBU ==>http://www.prodatacomputer.com/
              I only asked because it has a fantastic tool that allows you to view the journals as physical file records
              and use SQL to limit selections.

              I don't know a way to update a table that is journaled (correctly) and not produce a changed record.

              anyone else wanna jump in on this?

              jamie
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

                When the 400 is IPL'ed, does journaling stop? If so, is it possible to have a CL fire while journaling is down?

                Comment


                • #9
                  Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

                  Originally posted by bweiner View Post
                  When the 400 is IPL'ed, does journaling stop? If so, is it possible to have a CL fire while journaling is down?
                  You would have to stop journaling on a file in order for changes not to be picked up in the journal. You can see when journaling stops and starts in the journal itself. If you dont stop journaling on the file, then an IPL is not going to allow something to run at startup that doesnt get in the journal.

                  Basically, there isnt a trap-door around journaling. If the file is journaled, you can not in no way, shape, or form, do anything to the file that doesnt show up in the journal. I think part of your problem is that you arent allowed to run the approriate journal commands, and are looking at the backside of another product that may be filtering out some of the journal entries.

                  I they dont want to to run something from the command line, then have them add a DSPJRN prompt on a menu option for you.
                  Michael Catalani
                  IS Director, eCommerce & Web Development
                  Acceptance Insurance Corporation
                  www.AcceptanceInsurance.com
                  www.ProvatoSys.com

                  Comment


                  • #10
                    Re: Journaling - Updates made to table not showing in journal? Or, am I misinterpreti

                    Originally posted by bweiner
                    I monitor the journal for any insert, update, delete, etc... that would indicate a change to the record. I write that info to a table for easy retrieval.
                    How is this part of the process being done ?
                    Greg Craill: "Life's hard - Get a helmet !!"

                    Comment

                    Working...
                    X