|
Dan, What I meant in my original post was simply use a data structure where positions 1 thru 96 (or whatever) are the source records and 1 thru 96 are also the array. So each byte is redefined. If you are actually starting to think this might be useable, you could use a trick I've used for generating hash values. Overlapping the array definitions like: 1 4 el,1 2 6 el,2 4 8 el,3 So each byte ends up in 2 elements. That would catch any 2 character transposition for sure. And if you simply added the element number to the element before cross footing, that should catch any "moving" around of the data. Then perhaps add the record number to the record total. That would catch the moving around of records. This might be workable. As I said, it is brute force. Not very elegant. But might be quick to program. Bob -----Original Message----- From: mi400-admin@midrange.com [mailto:mi400-admin@midrange.com]On Behalf Of Dan Bale Sent: Thursday, May 09, 2002 5:02 PM To: mi400@midrange.com Subject: RE: [MI400] Generate hash code for a source member? Ya know, I've used CMPPFM enough to realize that there was some special stuff going on for it to be able to identify statements that are not the same, but still able to "match" them when the new file's statement was changed from the old. Also, I've found that most people don't realize that there is a companion to CMPPFM called MRGSRC (Merge Source Physical File). I've only used it a few times, a long long time ago; could never get comfortable to trust it, always had to verify what it did and that took more time than if I just did the "merge" myself. But still, pretty neat stuff. Tom, I understand that 20 bytes of hash is never going to absolutely guarantee that two generations of the same hash value mean that the two source members are identical. Still, 20 bytes = 16**20 = 1,208,925,819,614,629,174,706,176 --- I think those are pretty good odds. Also, I had to re-read Bob Crother's original suggestion after Tom clarified something for me. I misinterpreted the "Read the source record in as an array of 32 bit integers." Now I'm not sure what that really means. How do I turn a source record into an array of 32 bit integers? Would this be "better"/more unique than the CIPHER hash that Leif's MIFHASH app will generate? - Dan Bale (I am *NOT* "Dale" http://archive.midrange.com/midrange-l/200105/msg00281.html ) SAMSA, Inc. 989-790-0507 DBale@SAMSA.com <mailto:DBale@SAMSA.com> Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/mi400 or email: MI400-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.