Patrick Roehl wrote: > Is it possible to determine if a record buffer has changed without storing > the whole buffer? A checksum doesn't seem to be enough, since rearranging > two fields in the buffer would yield the same checksum result. That is, if > the LAST-NAME and FIRST-NAME fields get switched, the buffer has changed but > a checksum might not pick that up. > > I'm hoping someone has thought this through before. Is there an available > algorithm that can calculate a hash that would detect any buffer change, or > an extremely high percentage of them? (I'm aware of the CBTtape offerings > but don't know if they would work well for this.) > > Proposed Usage: Get buffer, calculate hash, save hash. Get buffer some > time later, calculate hash, determine if buffer changed. > > Any suggestions would be appreciated. > > Any of the standard hash algorithms would work. MD5, SHAxxx. If you have ICSF active there are API's that you can call to create the hashes.
-- Mark Jacobs Time Customer Service Tampa, FL ---- Progress doesn't come from early risers - progress is made by lazy men looking for easier ways to do things. Robert A. Heinlein - Time Enought for Love(1973) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

