ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Not sure how this happens, but... It did

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

  • Not sure how this happens, but... It did

    We have a fix going into our Production system due to the following:

    There's a Physical Table defined (DDS) as Unique. It does have 1 or 2 LF's attached. A process blew up over the weekend while reading the file because it has Duplicates.

    They're having to copy the records out then back in to update the table and remove the Duplicates to get it to work again...

    How?!?

  • #2
    Re: Not sure how this happens, but... It did

    the only time i've even heard of that type of thing occurring is with an interrupted restore operation on the table...anything like that happen recently?
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Not sure how this happens, but... It did

      The culprit is probably a damaged object type of scenario. You could run DSPOBJD against the file to see if it is fully or partiially damaged. You probably need to to make sure to keep the problem from occuring again if it is damaged.
      Last edited by MichaelCatalani; June 30, 2011, 05:02 PM.
      Michael Catalani
      IS Director, eCommerce & Web Development
      Acceptance Insurance Corporation
      www.AcceptanceInsurance.com
      www.ProvatoSys.com

      Comment


      • #4
        Re: Not sure how this happens, but... It did

        Did you check (I'm sure you did ) if the table is really unique, not only the source shows the keyword and the object has been generated from another version? I know, that every system here has only sources which are exactly representing the objects (... cough ... sorry) but once in a while I come across such situations

        So there is no pun intended ... just a hint
        Sven

        The best way to prove your knowledge is to share it ...

        Comment


        • #5
          Re: Not sure how this happens, but... It did

          Yes, the PF is truly Unique... that's what was baffling me. Each are good points and I'm gonna research it a little bit more. Just never heard of such happening. But, I can see the Damaged Object issue.

          I'll let you guys know what I find out...

          Comment


          • #6
            Re: Not sure how this happens, but... It did

            Another possibility that I have seen is that the program reading the PF by the unique key thinks that its unique for a different set of keys/values than what it realy is...for example, the program logic may think that another field was part of the key that made it unique. If this particular field had always been constant throughout time then suddenly another application wrote a different value into this field - the batch application blows up. I know it sounds weird, but I saw this situation happen once with an obscure program that had been running for years...

            Good luck...

            Terry

            Comment


            • #7
              Re: Not sure how this happens, but... It did

              Hey Terry,

              Thanks! This is being used by a COBOL program. I do know that COBOL will (sometimes) perform a -Read-Delete-Write- on records. Could this logic be an issue? I thought that the Uniqueness of a record in this instance was controlled by the system.

              Comment


              • #8
                Re: Not sure how this happens, but... It did

                The method of reading, deleting, and writing in any language shouldnt be an issue. The unique keyword sets a database constraint, which should affect anything that deals with the database, including sql.

                I had seen a ptf issue years ago that caused a similar problem. (Honestly, it may have been on the S38. ) I think the issue was that the access path maintenance for a file was allowed to be changed to *delay for a unique file, which shouldnt be allowed to happen. Duplicates got written, and when the next program came in to read the file, the access path was rebuilt and failed due to duplicates.
                Michael Catalani
                IS Director, eCommerce & Web Development
                Acceptance Insurance Corporation
                www.AcceptanceInsurance.com
                www.ProvatoSys.com

                Comment

                Working...
                X