Batch comparison examples
The following control statement compares a PSB in the test library to the same PSB in the production library:
COMPARE PSB(HDAMAP01) -
PSBLIB(IMST.PSBLIB) -
PSBLIB2(IMSP.PSBLIB)Note that the PSB2 specification is not necessary because Compare Block 1 has the same name as Compare Block 2. Database Integrity produces the Compare report for each comparison that has differences, in addition to the Compare Summary report.
The following control statement compares a DBD in the production library to its corresponding production ACB:
COMPARE DBD(HDAMDB01) -
DBDLIB(IMSP.DBDLIB) -
ACBLIB2(IMSP.ACBLIB)Note that if you want to provide the library names with DD statements in the JCL, the following control statement accomplishes the same results:
COMPARE DBD(HDAMDB01) -
ACB2The ACB2 keyword is necessary because if omitted, Database Integrity assumes that you want to compare DBD to DBD and looks for the DBDLIB2 DD statement instead.
In both cases, Database Integrity produces the Compare report for each comparison that has differences, in addition to the Compare Summary report.
The following control statement compares a DBD in the production library to another DBD residing in the same library:
COMPARE DBD(HDAMDB01) -
DBDLIB(IMSP.DBDLIB) -
DBD2(HDAMDB11) -
DBDLIB2(IMSP.DBDLIB)Note that the DBDLIB2 specification is necessary since Database Integrity does not default to the DBDLIB specification. Database Integrity produces the Compare report for each comparison that has differences, in addition to the Compare Summary report.
The following control statement compares all of the PSBs starting with the characters CUST in the production library with their corresponding production ACBs. It also prints the Compare report for all selected control blocks (not just those with exception conditions):
COMPARE PSB(CUST*) -
PSBLIB(IMSP.PSBLIB) -
ACBLIB2(IMSP.ACBLIB) -
EXONLY(NO)The following control statement compares all of the PSBs starting with the characters CUST in the production library with their corresponding production ACBs. It also removes all equal control statements (those that are the same in each control block) and prints the Compare report for only the not equal control statements (those that have been added, deleted, or changed):
COMPARE PSB(CUST*) -
PSBLIB(IMSP.PSBLIB) -
ACBLIB2(IMSP.ACBLIB) -
XEQUAL(YES)The following control statement compares all of the PSBs in the production library to their corresponding production ACBs:
COMPARE PSB(ALL) -
PSBLIB(IMSP.PSBLIB) -
ACBLIB2(IMSP.ACBLIB)Note that in this case, if a PSB in the library has no corresponding ACB, Database Integrity generates a message. However, it will not generate a message for an ACB that does not have a corresponding PSB.
Database Integrity produces the Compare report for each comparison that has differences, in addition to the Compare Summary report.
The following control statement compares all of the test DBDs that contain 1 in the second position and CT in the fourth and fifth positions to their corresponding production DBDs:
COMPARE DBD(+1+CT*) -
DBD2 -
DBDLIB(IMST.DBDLIB) -
DBDLIB2(IMSP.DBDLIB)In this case, the DBD2 keyword is used to emphasize that each Compare Block 2 is a DBD and has the same name as the corresponding Compare Block 1.
The following control statement shows how to compare a single directory entry from the current directory to a PSBLIB member.
COMPARE DIRLIB(IMSP.MACB,C) DIR(CUSTPSB) -
PSBLIB2(IMSP.PSBLIB)