CMPOBJ – Compare Objects

0 Comments

CMPOBJ

The CMPLIB (Compare Objects) tool compares objects from anywhere on the system to find differences in the object definition, or embedded modules or source version it was compiled from: 

CMPOBJ OBJ(*ALL/PGM_NAME) TYPE(*ALL)            

This will show all the objects that match your selection – then create a SHAH1 hash value based on

  • object name
  • object description
  • source change date
  • and embedded modules if an ILE object

For example, here is a real-world example where we want to see every occurrence of a program called pgm(PROOF) and compare the differences in any library system-wide:

CMPOBJ OBJ(*ALLUSR/PROOF) TYPE(*PGM)
CMPOBJ

We can see the different hash values on the right-hand column clearly showing which programs are identical and which have differences.

About the author 

Software Projex

Home of free IBM i | System i | iSeries | AS400 software utilities since the twentieth century.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Subscribe to get the latest updates
>