TechTalk: Compare Objects

  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

From: Chris Ringer To: All

Is there a way to compare two program objects? I found two with the same name on my system and needed to see if they were the same hex-wise. Believe it or not, I ran the Dump Object (DMPOBJ) command for each, held the spool files and compared them byte by byte. Thank goodness it was a short program!

From: Ernie Malaga To: Chris Ringer

That's a pretty nifty idea. If the objects get to be too large to perform the comparison by eyesight (your eyes will go crazy after a while with all that alphabet soup), you can copy the spooled files generated by DMPOBJ to two separate files, and then run a tool in QUSRTOOL to compare two files. I don't recall the name of the tool, but it's there.

If the tool in question can only compare source code, you can write your own simple RPG program to perform the comparison. It wouldn't be hard at all, and it would save you from having to go to the ophthalmologist afterwards.

From: Chris Ringer To: Ernie Malaga

I found the QUSRTOOL. It is called Compare Database Files (CMPDBF). You're right. I could have copied my spool dump files to physical files and then compared the physical files. I won't go into detail about how I determined where in the object code a MOVE 'C' was being done!!