Previous Topic: ParametersNext Topic: FORMAT


Example

In this example, FIELDDISPLAY prints only the mismatched fields of that record. For matching records all fields are printed.

COMPARE,
  COMPREPORT(A),
  FIELDDISPLAY(M), 
  FORMAT(SINGLE),
  LAYOUTFILE(CUSTOMER.COPYBOOK(CUSTREC))

Compare Report Old File CUSTOMER.OLDFILE Rec Length = 80 New File CUSTOMER.NEWFILE Rec Length = 80 Match Old Rec #1 New Rec #1 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 *---+----1----+----2----+----3----+----4 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 Intl Widget 21 03 COMPANY-ADDRESS C 30 534 Commerce Way 51 03 COMPANY-CITY C 10 Denver 61 03 COMPANY-STATE-CODE C 2 CO 63 03 FILLER C 18 Compare Report Old File CUSTOMER.OLDFILE Rec Length = 80 New File CUSTOMER.NEWFILE Rec Length = 80 Change Old Rec #2 New Rec #2 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 *---+----1----+----2----+----3----+----4 21 03 COMPANY-ADDRESS C 30 974 EZ Street 1627 Helen Ave. 51 03 COMPANY-CITY C 10 Miami Jupiter S U M M A R Y R E P O R T Old Records Read 2 New Records Read 2 Records Matched 1 Records Changed 1 Records Inserted 0 Records Deleted 0 The following files are compared: DDNAME DSN OLD => SYSUT1 CUSTOMER.OLDFILE NEW => SYSUT1C CUSTOMER.NEWFILE All records on OLD and NEW files are reported with mismatches identified. Record display is single record formatted with line(s) for each field. For changed records, only fields which are different are displayed.