IEBCOMPR

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.

·         General structure


//STEPCMPR EXEC PGM=IEBCOMPR
//SYSUT1   DD DSN=G1SG00AT.INPUT1,DISP=SHR
//SYSUT2   DD DSN=G1SG00AT.INPUT2,DISP=SHR
//SYSOUT   DD *
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY


·         Compare 2 PSDSs that reside on 9-track tape volumes


//STEPCOMP EXEC PGM=IEBCOMPR
//SYSPRINT DD  SYSOUT=A
//SYSUT1   DD  DSNAME=SET1,UNIT=tape,LABEL=(,NL),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000),
//             DISP=(OLD,KEEP),VOLUME=SER=001234
//SYSUT2   DD  DSNAME=SET2,UNIT=tape,LABEL=(,NL),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=1040),
//             DISP=(OLD,KEEP),VOLUME=SER=001235
//SYSIN    DD  DUMMY
/*

Here datasets are residing on unlabeled 9 track tape volumes.


·         Compare 2 PSDSs that reside on 7-track tape volumes


//STEPCOMP EXEC PGM=IEBCOMPR
//SYSPRINT DD  SYSOUT=A
//SYSUT1   DD  DSNAME=SET1,LABEL=(2,SUL),DISP=(OLD,KEEP),
//             VOL=SER=001234,DCB=(DEN=2,RECFM=FB,LRECL=80,
//             BLKSIZE=2000,TRTCH=C),UNIT=tape
//SYSUT2   DD  DSNAME=SET2,LABEL=(,SUL),DISP=(OLD,KEEP),
//             VOL=SER=001235,DCB=(DEN=2,RECFM=FB,LRECL=80,
//             BLKSIZE=2000,TRTCH=C),UNIT=tape
//SYSIN    DD  *
  COMPARE  TYPORG=PS
  LABELS  DATA=ONLY
/*

SYSUT1 DD defines an input data set, SET1, which resides on a labeled, 7-track tape volume. The blocked data set was originally written at a density of 800 bits per inch (DEN=2) with the data converter on (TRTCH=C).

SYSUT2 DD defines an input data set, SET2, which is the first or only data set on a labeled, 7-track tape volume. The blocked data set was originally written at a density of 800 bits per inch (DEN=2) with the data converter on (TRTCH=C).

SYSIN DD defines the control data set, which follows in the input stream.

COMPARE TYPORG=PS specifies that the input data sets are sequentially organized.

LABELS DATA=ONLY specifies that user header labels are to be treated as data and compared. All other labels on the tape are ignored.


·         Compare 2 PSDSs residing on different density tape volumes


//STEPCOMP EXEC PGM=IEBCOMPR
//SYSPRINT DD  SYSOUT=A
//SYSUT1   DD  DSNAME=SET1,LABEL=(,SUL),DISP=(OLD,KEEP),
//             VOL=SER=001234,DCB=(DEN=1,RECFM=FB,LRECL=80,
//             BLKSIZE=320,TRTCH=C),UNIT=tape
//SYSUT2   DD  DSNAME=SET2,LABEL=(,SUL),DISP=(OLD,KEEP),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=640),
//             UNIT=tape,VOLUME=SER=001235
//SYSIN    DD  *
  COMPARE  TYPORG=PS
  EXITS  INHDR=HDRS,INTLR=TLRS
  LABELS  DATA=NO
/*

SYSUT1 DD defines an input data set, SET1, which is the first or only data set on a labeled, 7-track tape volume. The blocked data set was originally written at a density of 556 bits per inch (DEN=1) with the data converter on (TRTCH=C).

SYSUT2 DD defines an input data set, SET2, which is the first or only blocked data set on a labeled tape volume. In this example, assume SYSUT2 is on a 9-track tape drive.

SYSIN DD defines the control data set, which follows in the input stream.

COMPARE TYPORG=PS specifies that the input data sets are sequentially organized.

EXITS identifies the names of routines to be used to process user input header labels and trailer labels.

LABELS DATA=NO specifies that the user input header and trailer labels for each data set are not to be compared.


·         Compare two partioned datasets


//STEP1    EXEC PGM=IEBCOMPR
//SYSPRINT DD  SYSOUT=A
//SYSUT1   DD  DSNAME=PDSSET1,UNIT=disk,DISP=SHR,
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000),
//             VOLUME=SER=111112
//SYSUT2   DD  DSNAME=PDSSET2,UNIT=disk,DISP=SHR,
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000),
//             VOLUME=SER=111113
//SYSIN    DD  *
  COMPARE  TYPORG=PO
/*

SYSUT1 DD defines an input partitioned data set, PDSSET1. The blocked data set resides on a disk volume.

SYSUT2 DD defines an input partitioned data set, PDSSET2. The blocked data set resides on a disk volume.

SYSIN DD defines the control data set, which follows in the input stream.

COMPARE TYPORG=PO indicates that the input data sets are partitioned.


·         Compare two PDSEs


//STEPCOMP EXEC PGM=IEBCOMPR
//SYSPRINT  DD  SYSOUT=A
//SYSUT1    DD  DSN=PDSE1,DISP=SHR
//SYSUT2    DD  DSN=PDSE2,DISP=SHR
//SYSIN     DD  *
  COMPARE TYPORG=PO
/*

Because a PDSE must be managed by the Storage Management Subsystem, you need not specify the UNIT or VOLUME parameters.

SYSUT1 DD and SYSUT2 DD define input PDSEs, PDSE1, and PDSE2. Because no DCB values are specified, the DCB values that were specified in creating the data sets will be used.

SYSIN DD defines the control data set, which follows in the input stream.

COMPARE TYPORG=PO indicates that the input data sets are PDSEs.


·         IEBCOMPR return codes:


IEBCOMPR returns a code in register 15 to indicate the results of program execution. The return codes and their meanings are:

00 (X'00') - Successful completion.
08 (X'08') - An unequal comparison. Processing continues.
12 (X'0C') - An unrecoverable error exists for unequal comparison. Utility ends.
16 (X'10') - A user routine passed a return code of 16 to IEBCOMPR. The utility ends.


Note: Use the SuperC utility instead of IEBCOMPR. SuperC is part or ISPF/PDF and the High Level Assembler Toolkit Feature. SuperC can be processed in the foreground as well as in batch and its report is more useful. 

Comments

Popular posts from this blog

Date/time constants in JCL

JCL ABeND --

IEBGENER usage examples