COMPARE command
The COMPARE command compares members of two data sets.
Syntax
COMPARE
Parameters
None.
Usage
The DSN1 and DSN2 commands are required to specify the data sets to be compared. The VOL1 and VOL2 commands are required to specify the volumes when comparing uncataloged data sets.
The output is influenced by the setting of the OPTION command. The possible reporting options are SAME, DIFF, MISMATCH, MATCH, MODS, and ALL.
Example 1: COMPARE multiple pairs of libraries – Detailed MODS comparison
OPTION=MODS
*
DSN1=SYS1.PROCLIB.NEW
DSN2=SYS1.PROCLIB.OLD
COMPARE
Example 2: COMPARE multiple pairs of libraries identifying differences only
OPTIONS=DIFF
*
NEWDSN=SYS1.PARMLIB
OLDDSN=SYS2.PARMLIB
COMPARE
*
NEWDSN=SYS1.LINKLIB
OLDDSN=SYS2.LINKLIB
COMPARE
Example 3: COMPARE multiple pairs of libraries residing on a primary volume and an alternate volume
OPTIONS=MODS
*
VOL1=RES001
DSN1=SYS1.PARMLIB
VOL2=RES002
DSN2=SYS1.PARMLIB
COMPARE
*
DSN1=SYS1.PROCLIB
DSN2=SYS1.PROCLIB
COMPARE
Example 4: Using the REJECT command during the COMPARE operation
OPTIONS=CHANGEONLY
REJECT=(DSN=IBMUSER.PRS3.LINKLIB,MEM=CYGDEFLT,VOL=*)
REJECT=(DSN=IBMUSER.PRS2.LINKLIB,MEM=CYGDEFLT,VOL=*)
REJECT=(DSN=IBMUSER.PRS3.SRL,VOL=*,MEM=COMP*)
REJECT=(DSN=IBMUSER.PRS2.SRL,VOL=*,MEM=COMP*)
. . .
DSN1=IBMUSER.PRS3.LINKLIB
DSN2=IBMUSER.PRS2.LINKLIB
COMPARE
DSN1=IBMUSER.PRS3.SRL
DSN2=IBMUSER.PRS2.SRL
COMPARE
Related commands
DSN1, DSN2
