Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Comparex -- KEY SYNCHRONIZATION MISMATCH

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Tue Oct 02, 2012 11:44 pm    Post subject: Comparex -- KEY SYNCHRONIZATION MISMATCH
Reply with quote

Hi,

Im using comparex for comparing the Unloads of DB2 Table.

The Key field is 1 to 57. There is a Binary field in the 36 position of 2 bytes (S9(04) Comp) which im Masking for comparing the unloads.

The total record count of both unloads match, but in the output im Getting "KEY SYNCHRONIZATION MISMATCH".

I sorted both the unloads before compasion on (1,57,CH,A).

Comparex Sysin is as below,
KEY=(01,57)
MASK=(36,2)
COPYDIFF

Please let me know if there is a Masking Used in the key field, the comparex would throw such error or there are mismatches.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 02, 2012 11:55 pm    Post subject:
Reply with quote

Hello,

You do realize that Comparex is not part of the DFSORT product (unless i missed the memo)?

Quote:
Please let me know if there is a Masking Used in the key field, the comparex would throw such error or there are mismatches.
What does the Comparex documentation say?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 03, 2012 12:56 am    Post subject:
Reply with quote

Elixir,

As dick scherrer pointed out, Comparex utility is not related to DFSORT. However here is an equivalent DFSORT JCL which will give you the desired results based on your comparex control cards.

Code:

//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//INA      DD *                                         
RECORD00000000000000000000000000001NOAAAAAAAAAAAAAAAAAAAA
RECORD00000000000000000000000000002NNBBBBBBBBBBBBBBBBBBBB
RECORD00000000000000000000000000003NBCCCCCCCCCCCCCCCCCCCC
//INB      DD *                                         
RECORD00000000000000000000000000001NOAAAAAAAAAAAAAAAAAAAA
RECORD00000000000000000000000000004NNBBBBBBBBBBBBBBBBBBBB
RECORD00000000000000000000000000005NBCCCCCCCCCCCCCCCCCCCC
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
  OPTION COPY                                           
  JOINKEYS F1=INA,FIELDS=(1,35,A,38,20,A)               
  JOINKEYS F2=INB,FIELDS=(1,35,A,38,20,A)               
  JOIN UNPAIRED,F2,ONLY                                 
//*
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Oct 03, 2012 6:35 am    Post subject:
Reply with quote

Thanks very much skolusu.

I ran using the following control card and the sortout is empty.

Does it mean that all the fields in both the files except column 36 and 37 are equal.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Wed Oct 03, 2012 11:37 am    Post subject: Reply to: Comparex -- KEY SYNCHRONIZATION MISMATCH
Reply with quote

Yes.

Kolusu provided test data even. Did you run with that?
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Oct 03, 2012 6:13 pm    Post subject:
Reply with quote

the record length of my files being compared are 738

below is the control card i used

OPTION COPY
JOINKEYS F1=INA,FIELDS=(1,35,A,38,701,A)
JOINKEYS F2=INB,FIELDS=(1,35,A,38,701,A)
JOIN UNPAIRED,F2,ONLY

I got sortout empty
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Wed Oct 03, 2012 6:21 pm    Post subject:
Reply with quote

What do you get when you run Kolusu's example AS IS? I got 2 records on SORTOUT.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Wed Oct 03, 2012 6:33 pm    Post subject:
Reply with quote

Elixir wrote:
the record length of my files being compared are 738

below is the control card i used

OPTION COPY
JOINKEYS F1=INA,FIELDS=(1,35,A,38,701,A)
JOINKEYS F2=INB,FIELDS=(1,35,A,38,701,A)
JOIN UNPAIRED,F2,ONLY

I got sortout empty


As has been suggested, run with test data.

With the above, if you have a records on INA which are "surplus" they are ignored. All records on INB match to a record on INA. If you look at the Sysout, you'll see record counts. Are they they same?

If your 1,35 makes a unique key, and the data is in order, you wouldn't need the default Sort that is happening.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 03, 2012 10:35 pm    Post subject:
Reply with quote

Elixir wrote:
Thanks very much skolusu.

I ran using the following control card and the sortout is empty.

Does it mean that all the fields in both the files except column 36 and 37 are equal.


NO. I gave DFSORT equivalent control cards for your comparex control cards. If you got an empty sortout, it doesn't mean that both files are equal, it just means that INB file does not have any extra records that don't match with records in INA file. If you had ran the sample JCL I gave you would have noticed that it did not write the mismatched records from INA file.


Elixir wrote:

the record length of my files being compared are 738
I got sortout empty


In your initial post you mentioned that the key is only 57 bytes, now how did it dramatically increase to 738 bytes? Is this a entirely a new requirement ? If you want to compare the full 738 bytes why are your comparex control cards only checking for 57 bytes as key?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts Record Extraction Mismatch from Header sri_gans CLIST & REXX 3 Mon Dec 08, 2014 8:23 am
No new posts mismatch between dfsrmm volume and SM... meykh2014 JCL & VSAM 3 Sat Oct 04, 2014 12:06 pm
No new posts XID received and XID sent Mismatch david6789 All Other Mainframe Topics 0 Fri Sep 05, 2014 6:38 pm
No new posts Need Comparex Study Material daga.aditya JCL & VSAM 3 Mon Dec 02, 2013 11:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us