IEBCOMPR

IEBCOMPR is a data set utility used to compare two sequential data sets, two partitioned data sets or two PDSEs at the logical record level to verify a backup copy. Fixed, variable, or undefined records from blocked or unblocked data sets or members can also be compared. However, you should not use IEBCOMPR to compare load modules.

Two sequential data sets are considered equal, that is, are considered to be identical, if:

  • The data sets contain the same number of records, and
  • Corresponding records and keys are identical

Two partitioned data sets or two PDSEs are considered equal if:

  • Corresponding members contain the same number of records
  • Note lists are in the same position within corresponding members
  • Corresponding records and keys are identical
  • Corresponding directory user data fields are identical

If all these conditions are not met for a specific type of data set, those data sets are considered unequal. If records are unequal, the record and block numbers, the names of the DD statements that define the data sets, and the unequal records are listed in a message data set. Ten successive unequal comparisons stop the job step, unless you provide a routine for handling error conditions.

Load module partitioned data sets that reside on different types of devices should not be compared. Under most circumstances, the data sets will not compare as equal.

Partitioned data sets or PDSEs can be compared only if all the names in one or both of the directories have counterpart entries in the other directory. The comparison is made on members identified by these entries and corresponding user data.



Sample JCL

			
		//IEBCOPY JOB  ACCT,'IEBCOPY',MSGCLASS=X,CLASS=D
		//STEP001  EXEC PGM=IEBCOPY                   
		//SYSUT1    DD DSN=XXXX.XXXX.XXXX.XXXX,
		//            DISP=SHR 
		//SYSUT2    DD DSN=YYYY.YYYY.YYYY.YYYY,
		//            DISP=SHR 
		//SYSPRINT  DD SYSOUT=*
		//SYSIN     DD DUMMY
		


JCL Control Statements

SYSPRINT DD Statement

  • must be present for each use of IEBCOMPR. The block size specified in the SYSPRINT DD statement must be a multiple of 121.

SYSUT1 DD Statement

  • Defines a partitioned data set (file 1 for compare)

SYSUT2 DD Statement

  • Defines a partitioned data set (file 2 for compare)

SYSIN DD Statement

  • The SYSIN DD statement is required. The block size specified in the SYSIN DD statement must be a multiple of 80.

The input data sets must have the same logical record length. Otherwise, a comparison of the two data sets will show them to be unequal. The block sizes of the input data sets can differ. For fixed block (FB) data sets, block sizes must be multiples of the logical record length. The block sizes cannot exceed 32760 bytes.



Utility Control Statements

  • COMPARE
  • EXITS
  • LABELS

Return Codes

00

Successful completion

04

An unequal comparison. Processing continues.

12

An unrecoverable error exists. The utility ends

16

A user routine passed a return code of 16 to IEBCOMPR. The utility ends.


Examples

suggestion / complaint / feedback Web Statistics