JOINKEYS for two different file layout compare



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

JOINKEYS for two different file layout compare

Postby Ramsee » Tue Jul 22, 2014 6:48 pm

Hi ,
I am comparing two files File with LRECL = 154 File2 with LRECL =19
Keys in the File1 = 4,9 Keys in File2 = 1,9

I used follwoing SORTCARD for the task but the output is not as expected, please suggest me or correct me with your inputs.
OPTION COPY                                     
JOINKEYS FILES=F1,FIELDS=(4,9,A)                 
JOINKEYS FILES=F2,FIELDS=(1,9,A)                 
JOIN UNPAIRED                                   
REFORMAT FIELDS=(F1:01,154,F2:01,19)             
OUTFIL FNAMES=MTCH01,                           
  INCLUDE=(1,1,CH,NE,C' ',AND,155,1,CH,NE,C' '),
  BUILD=(1,154)                                 
OUTFIL FNAMES=UNMTCH01,                         
  INCLUDE=(1,1,CH,NE,C' ',AND,155,1,CH,EQ,C' '),
  BUILD=(1,154)                                 
OUTFIL FNAMES=UNMTCH02,                         
  INCLUDE=(1,1,CH,EQ,C' ',AND,155,1,CH,NE,C' '),
  BUILD=(155,19)                                 
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOINKEYS for two different file layout compare

Postby Healy » Tue Jul 22, 2014 7:28 pm

I am not an Expert(total Noob :) ) and someone would have to verify this solution but i think the problem may be in the INCLUDE statement

For comparison of matched and unmatched , try the following in place of the INCLUDE COND

INCLUDE=(1,154,CH,NE,C' ',AND,155,19,CH,NE,C' '),
 BUILD=(1,154)


INCLUDE=(1,154,CH,NE,C' ',AND,155,19,CH,EQ,C' '),
 BUILD=(1,154)


INCLUDE=(1,154,CH,EQ,C' ',AND,155,19,CH,NE,C' ')
BUILD=(155,19)



let me know if it works !
Healy
 
Posts: 14
Joined: Mon May 12, 2014 9:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOINKEYS for two different file layout compare

Postby BillyBoyo » Tue Jul 22, 2014 8:16 pm

Healy,

Nice to see you trying. That may well work. But before fixing something, we need to first know what is wrong...

Ramsee,

You didn't tell us what is wrong.

Can position one of your 154-byte record genuinely contain space? You can specify FILL= on the REFORMAT to give an uncommon value to the "empty" part of the REFORMAT record. You need to find a byte to test which can't genuinely have the value you are testing for. However, something else could be wrong. So what is it?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: JOINKEYS for two different file layout compare

Postby Ramsee » Wed Jul 23, 2014 3:25 pm

hi,

Thanks for help!!!
The SORTCARD given by Healy is working perfect!!
Thanks a lot BillyBoyo for giving me a new dimension to think about the records contaiing SPACES, as you are perfect that the INPUT File contained SPACES as well.

Feeling great that i am learning a lot from you all.

Thanks,
Ramsee
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post