Comparing a Multilevel Bill of Materials

I have two BOMs (Bill of Material) for which I want to compare. The BOM consists of BOM Level, Part Number, Description, ECO#, Revision#. The BOMs are on the order of 17K-19K parts, different sub assemblies can have the same parts, so I have to treat each sub-assembly as a unique collection.

Here's what I want to collect:

  1. Any Change in ECO# or Revision# - This should not be too difficult. Pull all the unique PN into two hases and compare the hashes.
  2. Change in the parts that make up a sub assembly. Additions, subtractions ... This appears to be a little more difficult. These BOMs can be up to 15 levels deep. Each level would need to be checked and compared. I would assume this would require a loop within a loop.
  3. Once all the changes are found I need to go back and capture the highest level PN an ECO affects. i.e. if sub-assembly A is made up of xyz and a ECO change affected everything in the assembly I want to report back A, if the change only affected x and it's sub parts then I want x reported back but not A. (This is required to determine the extent the ECO effected the full assembly.
I hope this is a little changing to someone. I am really looking for guidance and different approaches to this problem so I can attack it without having to use a hammer.

Thanks!

Edit kudra, 2002-06-06 Replaced pre tags with some other markup


In reply to Comparing a Multilevel Bill of Materials by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.