Here’s a Checksum program I use to verify that two Adabas files have identical contents. In my case, I am testing various methods of copying mainframe data to Adabas on Windows, and I needed a way to verify that the results are the same.

Nice piece of code. If I understand it correctly, you’re using Net-work to do all necessary type conversions between the Mainframe and the Windows world (i.e. EBCDIC <–> ASCII, Big Endian <–> Little Endian).

I got a related problem here, but I can’t use Net-Work, because my target-Database is not ADABAS…

I had tested my code with both databases on the same platform. As Matthias commented, my theory was that Net-Work would provide all the necessary conversions if the databases were on different platforms. Testing that theory exposed a minor flaw in my code.

Positive packed values on my zOS database contained a sign nibble of ‘F’ while the Windows version contained ‘C’. The numeric values are equivalent, but the Checksum routine sees them as different.

So, I added a line of code for each packed format field.

ADD 0 TO field-name

Now all the positive signs are the same. Which one I get is determined by the PSIGNF compiler option. (If your PSIGNF setting is the same on both platforms, this additional code is unnecessary.)

The updated source is attached.