The summary information provides the following global statistics on the compare:
Demonstrates how COMPARE produces a report formatting the data as defined by the copybook member, CUSTNAME, in the LAYOUTFILE keyword. All fields are printed and fields that mismatch are flagged. Each record is formatted separately.
COMPARE, LAYOUTFILE(CUSTOMER.COPYBOOK(CUSTNAME)), FORMAT(S), COMPREPORT(A), FIELDDISPLAY(A)
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 Change Old Rec #2 New Rec #2 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 *---+----1----+----2----+----3----+----4 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 Acme Widgets 21> 03 COMPANY-ADDRESS C 30 974 EZ Street 1627 Helen Ave. 51> 03 COMPANY-CITY C 10 Miami Jupiter 61 03 COMPANY-STATE-CODE C 2 FL 63 03 FILLER C 18 Delete Old Rec #3 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 Best Widgets 21 03 COMPANY-ADDRESS C 30 2424 Highland Dr. 51 03 COMPANY-CITY C 10 Boise 61 03 COMPANY-STATE-CODE C 2 ID 63 03 FILLER C 18 Match Old Rec #4 New Rec #3 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 *---+----1----+----2----+----3----+----4 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 CT Widgets 21 03 COMPANY-ADDRESS C 30 8021 Hartford Blvd 51 03 COMPANY-CITY C 10 Farmington 61 03 COMPANY-STATE-CODE C 2 CT 63 03 FILLER C 18 Insert New Rec #4 Pos *----------FIELD NAME-------------* FORMAT *---+----1----+----2----+----3----+----4 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 MA Widgets Co. 21 03 COMPANY-ADDRESS C 30 981 Springfield Blvd 51 03 COMPANY-CITY C 10 Chicopee 61 03 COMPANY-STATE-CODE C 2 MA 63 03 FILLER C 18 S U M M A R Y R E P O R T Old Records Read 4 New Records Read 4 Records Matched 2 Records Changed 1 Records Inserted 1 Records Deleted 1 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. All fields in the record are displayed.
The ability to define an implied key for a sequential file is demonstrated in the following example syntax. The implied key is treated like an actual key by the COMPARE command. COMPARE will treat columns 72 through 80 as a key field for both the old and new file.
COMPARE, OLDFILE(OLDSRC), NEWFILE(NEWSRC), SYNCKEY(72,8,72,ASCENDING)
The ability to compare certain record positions to either the record position of the NEWFILE or a particular data type is demonstrated in this example. In this case, record positions 23 – 27 of the OLDFILE are compared to the record positions 35 – 39 of the NEWFILE. Also, record positions 54 and 55 of the OLDFILE are compared to the character string, 'CT'. These POSITION keywords alone determine the outcome of the COMPARE command.
COMPARE, OLDFILE(OLDMSTR), NEWFILE(NEWMSTR), POSITION(23,5,35), POSITION(54,C'CT')
This example illustrates how to use the POSITION keyword with the COMPARE command to eliminate specific record positions from the comparison, by excluding them from the comparison.
No record positions greater than 72 are compared in this example. Setting an end position eliminates any erroneous mismatches from being reported, caused by any line numbering differences in those positions. This can be used with JCL and Assembler members.
COMPARE, OLDFILE(OJCL), NEWFILE(NJCL), POSITION(1,72)
Use the next example when comparing COBOL members. It only compares positions 7 to the end of the record.
COMPARE, OLDFILE(OCOBOL), NEWFILE(NCOBOL), POSITION(7,0)
Using the SELRECIF keyword in the following example lets you select or eliminate records for processing. Any record that contains either the character string 'DATE:' or 'TIME:' in the first five positions of OLDFILE is not selected for further processing.
COMPARE, OLDFILE(OLDRPT), NEWFILE(NEWRPT), SELRECIF(1,5,NE,C'DATE:'), AND(1,5,NE,C'TIME:')
The ability to compare specific record positions depending on the data found at a NEWFILE's record location is demonstrated in the following example. If record positions 65 and 66 are equal to the character string 'CT', then only the OLDFILE's record positions 76 – 78 are compared to the same record positions in the NEWFILE. Otherwise, the entire record is compared.
COMPARE,
OLDFILE(OLDMSTR),
NEWFILE(NEWMSTR),
IF(65,2,EQ,C'CT'),
POSITION(76,3)
The ability to write compared records to a sequential file based on their COMPARE results follows. Records that are identified as being INSERTED are written to the sequential file referenced by the ddname DDINSERT; DELETED records are written to DDDELETE, and MATCHED records are written to DDMATCH. For records identified as being CHANGED, only the newfile's changed records are written to the ddname DDCHANGE.
COMPARE, OLDFILE(OLDSRC), NEWFILE(NEWSRC), INSERTED(DDINSERT), DELETED(DDDELETE), CHANGED(DDCHANGE,NEW), MATCHED(DDMATCH)
This example illustrates how to compare multiple members of a partitioned data set. The members with names in the range IEAF* through IEAS* are compared in two different SYS1.PARMLIB data sets, pointed to by DD names OLDDATA and NEWDATA. A full directory report is requested.
COMPARE ,
MEMBER(IEAF-IEAS),
OLDFILE(OLDDATA),NEWFILE(NEWDATA),
COMPDIFF(0),
FORMAT(C),
DIRREPORT(A),
COMPREPORT(S)
Input SYSIN parameters to batch process are displayed below COMPARE , MEMBER(IEAF-IEAS), OLDFILE(OLDDATA),NEWFILE(NEWDATA), COMPDIFF(0), FORMAT(C), DIRREPORT(A), COMPREPORT(S) *** CAWA2100I DDNAME OLDDATA opened for DSN=SYS1.PARMLIB File is NonVSAM LRECL=80,BLKSIZE=3120,RECFM=FB,Mode=PS *** CAWA2100I DDNAME NEWDATA opened for DSN=SYS1.PARMLIB File is NonVSAM LRECL=80,BLKSIZE=3120,RECFM=FB,Mode=PS 1CA File Master Plus V9.0 Page 1 System CA11 2012-01-23 10:14 Compare Report Old File SYS1.PARMLIB Rec Length = 80 New File SYS1.PARMLIB Rec Length = 80 D I R E C T O R Y S U M M A R Y R E P O R T Compare Member Old New Records Records Records Records Result Name Records Records Matched Changed Inserted Deleted Match IEAFIX00 14 14 14 Insert IEAFIX01 6 6 Match IEAICS00 96 96 96 Match IEAIPCSP 80 80 80 Match IEAIPS00 95 95 95 Change IEALPA0N 61 55 16 35 4 10 Change IEALPA00 59 53 16 35 2 8 Change IEALPA01 59 53 15 38 6 Change IEALPA1C 59 53 16 35 2 8 Match IEAOPT00 36 36 36 Match IEAOPT01 35 35 35 Match IEAPAK00 1 1 1 Match IEAPAK01 1 1 1 ------------- ------------- ------------- ------------- ------------- ------------- Sum of records 596 578 421 143 14 32 Members Processed 13 Members Matched 8 Members Changed 4 Members Inserted 1 Members Deleted 0 The following files are compared: DDNAME DSN OLD => OLDDATA SYS1.PARMLIB NEW => NEWDATA SYS1.PARMLIB
Only the summary report is written. *** CAWA2101I DDNAME OLDDATA records read: 596, selected 596 from 12 members *** CAWA2101I DDNAME NEWDATA records read: 578, selected 578 from 13 members *** CAWA2536I OLDDATA and NEWDATA files do not match - Return Code set to 11 *** CAWA2550I COMPARE completed RC set to 11 High RC = 11 CAWA2001I SYSLIST output was directed to SYSPRINT CAWA2000I Utility ending, Max CC=11
This example illustrates how to compare programs.
All parameters use default values, so all program properties are included in the comparison.
COMPARE PROGRAM, OLDFILE(OLDPROG), NEWFILE(NEWPROG)
This example illustrates how to use the CSECTINCLUDE and CSECTEXCLUDE parameters when comparing programs.
Only CSECTs that match the specifications in CSECTINCLUDE and do not match the specifications in CSECTEXCLUDE are compared.
COMPARE PROGRAM, OLDFILE(OLDPROG), NEWFILE(NEWPROG), CSECTINCLUDE(CAWAC*,I*-R*), CSECTEXCLUDE(ISPDCOD*,L*,PP-P9)
This example illustrates how to use the PROPERTIESINCLUDE and PROPERTIESEXCLUDE parameters when comparing programs.
To compare all program properties except selected ones, use the PROPERTIESEXCLUDE parameter.
COMPARE PROGRAM, CSECTCOMPARE(BYNAME), CSECTINCLUDE(CAWAUR-CAWAUZT), PROPEXC(CONTENT,IDRUSER,IDRZAP), OLDFILE(OLDPROG), NEWFILE(NEWPROG), LINEPAGE(9999), FORMAT(C), COMPREPORT(A)
Input SYSIN parameters to batch process are displayed below COMPARE PROGRAM, CSECTCOMPARE(BYNAME), CSECTINCLUDE(CAWAUR-CAWAUZT), PROPEXC(CONTENT,IDRUSER,IDRZAP), OLDFILE(OLDPROG), NEWFILE(NEWPROG), LINEPAGE(9999), FORMAT(C), COMPREPORT(A) *** CAWA2100I DDNAME OLDPROG opened for DSN=CAIPROD.FILEMSTR.R85S0A.CDBILOAD(CAWABATC) File is NonVSAM LRECL=0,BLKSIZE=6144,RECFM=U,Mode=PS *** CAWA2100I DDNAME NEWPROG opened for DSN=TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWABATC) File is NonVSAM LRECL=0,BLKSIZE=27998,RECFM=U,Mode=PS Compare Report Old File CAIPROD.FILEMSTR.R85S0A.CDBILOAD(CAWABATC) New File TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWABATC) Change Program Info: TOTALSIZE 00002248 LINKDATE 2010.179 at 14:08:38 Program Info: TOTALSIZE 00002248 LINKDATE 2011.293 at 21:50:36 * *** ** ** * Match ENTRYPOINT CAWABATC in section CAWABATC + 00000000 Match Attributes: RENT REUS NOREFR AMODE(31) RMODE(31) AC(0) SSI(0120302F) +++++++++ Section CAWAURPT Match CSECTNAME CAWAURPT Change CSECTSIZE 000002A0 TRANSLATOR 569623400 CSECTDATE 2010.006 CSECTSIZE 000002A0 TRANSLATOR 569623400 CSECTDATE 2011.293 * *** ... Binder class B_ESD Match Symbol: CAWAURPT Type: SD(SD) Name_space: 00 Scope: Signature: Class: Align: 00 Symbol_attr: 00 Load_flags: 00 Record_format: 0000 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 00 Segment: 0001 Length: 00000000 Amode: 31 Usability: 00 Bind_cntl: 00 Region: 0001 Priority: 00000000 Rmode: LE_attr: 00 Status: 00 Match Symbol: B_TEXT Type: ED Name_space: 01 Scope: Signature: Class: B_TEXT Align: 03 Symbol_attr: 00 Load_flags: 00 Record_format: 0001 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 00 Segment: 0000 Length: 000002A0 Amode: Usability: 00 Bind_cntl: 00 Region: 0000 Priority: 00000000 Rmode: ANY LE_attr: 00 Status: 00 Match Symbol: CAWAURPT Type: LD(LD) Name_space: 01 Scope: M Signature: Class: B_TEXT Align: 00 Symbol_attr: 80 Load_flags: 00 Record_format: 0000 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 80 Segment: 0000 Length: 00000000 Amode: 31 Usability: 00 Bind_cntl: 00 Region: 0000 Priority: 00000000 Rmode: LE_attr: 00 Status: 00 +++++++++ Section CAWAUTOT Match CSECTNAME CAWAUTOT Change CSECTSIZE 000002B0 TRANSLATOR 569623400 CSECTDATE 2010.006 CSECTSIZE 000002B0 TRANSLATOR 569623400 CSECTDATE 2011.293 * *** ... Binder class B_ESD Match Symbol: CAWAUTOT Type: SD(SD) Name_space: 00 Scope: Signature: Class: Align: 00 Symbol_attr: 00 Load_flags: 00 Record_format: 0000 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 00 Segment: 0001 Length: 00000000 Amode: 31 Usability: 00 Bind_cntl: 00 Region: 0001 Priority: 00000000 Rmode: LE_attr: 00 Status: 00 Match Symbol: B_TEXT Type: ED Name_space: 01 Scope: Signature: Class: B_TEXT Align: 03 Symbol_attr: 00 Load_flags: 00 Record_format: 0001 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 00 Segment: 0000 Length: 000002B0 Amode: Usability: 00 Bind_cntl: 00 Region: 0000 Priority: 00000000 Rmode: ANY LE_attr: 00 Status: 00 Match Symbol: CAWAUTOT Type: LD(LD) Name_space: 01 Scope: M Signature: Class: B_TEXT Align: 00 Symbol_attr: 80 Load_flags: 00 Record_format: 0000 Elem_offset: 00000000 Autocall: 00 Fill: 00 Bind_flags: 80 Segment: 0000 Length: 00000000 Amode: 31 Usability: 00 Bind_cntl: 00 Region: 0000 Priority: 00000000 Rmode: LE_attr: 00 Status: 00 S U M M A R Y R E P O R T Old Records Processed 13 Old Sections Processed 2 New Records Processed 13 New Sections Processed 2 Records Matched 10 Sections Matched 0 Records Changed 3 Sections Changed 2 Records Inserted 0 Sections Inserted 0 Records Deleted 0 Sections Deleted 0 The following files are compared: DDNAME DSN OLD => OLDPROG CAIPROD.FILEMSTR.R85S0A.CDBILOAD(CAWABATC) NEW => NEWPROG TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWABATC) All records on OLD and NEW files are reported with mismatches identified. Records are displayed in character format. For changed records, only lines that contain differences are displayed. *** CAWA2536I OLDPROG and NEWPROG files do not match - Return Code set to 4 *** CAWA2550I COMPARE completed RC set to 4 High RC = 4 CAWA2001I SYSLIST output was directed to SYSPRINT CAWA2000I Utility ending, Max CC=4
To compare only selected program properties, use the PROPERTIESINCLUDE parameter.
COMPARE PROGRAM, CSECTCOMPARE(BYNAME), PROPINC(CONTENT,IDRUSER,IDRZAP), OLDFILE(OLDPROG), NEWFILE(NEWPROG), LINEPAGE(9999), FORMAT(C), COMPREPORT(M)
Input SYSIN parameters to batch process are displayed below COMPARE PROGRAM, CSECTCOMPARE(BYNAME), PROPINC(CONTENT,IDRUSER,IDRZAP), OLDFILE(OLDPROG), NEWFILE(NEWPROG), LINEPAGE(9999), FORMAT(C), COMPREPORT(M) *** CAWA2100I DDNAME OLDPROG opened for DSN=AD1DEV.FMMVS.CHLOG.FORCE.LOADLIB(CAWAOPTS) File is NonVSAM LRECL=0,BLKSIZE=27998,RECFM=U,Mode=PS *** CAWA2100I DDNAME NEWPROG opened for DSN=TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWAOPTS) File is NonVSAM LRECL=0,BLKSIZE=27998,RECFM=U,Mode=PS Compare Report Old File AD1DEV.FMMVS.CHLOG.FORCE.LOADLIB(CAWAOPTS) New File TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWAOPTS) +++++++++ Section CAWAOPTS ... Binder class B_TEXT Change +000000: 0000009B D4D6C47E 40404040 40404040 40D9C5D3 7EF94BF0 404040F0 F861F0F4 *....MOD= REL=9.0 08/04* +000000: 0000009B D4D6C47E 40404040 40404040 40D9C5D3 7EF94BF0 404040F1 F061F2F1 *....MOD= REL=9.0 10/21* * * * * ** ** Change +000020: 61F1F140 F0F84BF1 F940C3C1 40C68993 8540D481 A2A38599 40D793A4 A2404040 */11 08.19 CA File Master Plus * +000020: 61F1F140 F1F54BF5 F840C3C1 40C68993 8540D481 A2A38599 40D793A4 A2404040 */11 15.58 CA File Master Plus * * * * * ** ** Change +0001E0: 40404040 00000000 00000001 00000001 E86CE4C9 C4D7D9C5 C64BC6D4 D4E5E24B * ............Y%UIDPREF.FMMVS.* +0001E0: 40404040 00000000 00000000 00000000 D56CE4C9 C4D7D9C5 C64BC6D4 D4E5E24B * ............N%UIDPREF.FMMVS.* * * ** * ... Binder class B_IDRU Change +000000: F2F0F1F1 F2F1F600 0028F065 14962000 01459665 6C700030 660565E3 88000189 *2011216...0..o....o.%......Th..i* +000000: F2F0F1F1 F2F9F400 0028F065 14962000 00206214 00000030 660565E3 88000189 *2011294...0..o.............Th..i* * * ******* *** ** * * Change +000020: 45C75000 04165000 00003101 06C33316 D8F04040 40404040 40404040 40404040 *.G&...&......C..Q0 * +000020: 45C75000 17644000 00003201 02C61717 26F04040 40404040 40404040 40404040 *.G&... ......F...0 * ***** * * *** * ** * * * ... Binder class B_IDRZ Delete IDRZAP data RO123456 Date applied 2011.224 S U M M A R Y R E P O R T Old Records Processed 22 Old Sections Processed 1 New Records Processed 21 New Sections Processed 1 Records Matched 16 Sections Matched 0 Records Changed 5 Sections Changed 1 Records Inserted 0 Sections Inserted 0 Records Deleted 1 Sections Deleted 0 The following files are compared: DDNAME DSN OLD => OLDPROG AD1DEV.FMMVS.CHLOG.FORCE.LOADLIB(CAWAOPTS) NEW => NEWPROG TFM.MOTM.FMMVS.BASE.P2.LOADLIB(CAWAOPTS) Mismatched records (inserts, deletes, and changes) are reported. Records are displayed in character format. For changed records, only lines that contain differences are displayed. *** CAWA2536I OLDPROG and NEWPROG files do not match - Return Code set to 4 *** CAWA2550I COMPARE completed RC set to 4 High RC = 4 CAWA2001I SYSLIST output was directed to SYSPRINT CAWA2000I Utility ending, Max CC=4
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|