Page 1 of 1

Jon keys and Syncsort

PostPosted: Fri Jul 03, 2015 4:00 am
by Nara_513
Hi All,

I am using the below code to compare two files, my requirement is:

Compare data in two files and i need the File1 data which is not matching the below condition:

File 1 and File 2 data should match on the below column data. Now basically my question is my sort fulfills my requirement ? the reason why am asking is the input data in both the files is around 20 M and is tough to validate it.

01,11, ZD
13,07, CH
29,10,CH
377,09,CH



//S1 EXEC SORT
//SORTJNF1  DD DSN=File1.SORTED,DISP=SHR
//SORTJNF2  DD DSN=File2.REF.SORTED,DISP=SHR
//SORTOUT   DD DSN=Output.UNIQ,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(800,800),RLSE),
//             DCB=(LRECL=430,RECFM=FB)
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
  JOINKEYS FILE=F1,
       FIELDS=(1,11,A,13,07,A,29,10,A,377,09,A),SORTED,NOSEQCK
  JOINKEYS FILE=F2,
       FIELDS=(1,11,A,13,07,A,29,10,A,377,09,A),SORTED,NOSEQCK
  JOIN UNPAIRED,F1,ONLY
  SORT FIELDS=COPY
/*



And at last, how i can achieve the same output using the ICETOOL statement:

I used the below:

//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(01,11,CH) -
 ON(13,07,CH)   ON(29,10,CH)  ON(377,09,ZD) -
ALLDUPS DISCARD(UNIQUE)
/*


But it didn't worked, as expected so i read the documentation for ICETOOL and realized that its not going to work with multiple ON.
Can anyone suggest how i can get this done using ICETOOL as well.
The reason why am asking is, i need to validate the output created by the JOIN KEYS before i go ahead and do it a production job.

Thanks in advance For your time !!!

Re: Jon keys and Syncsort

PostPosted: Fri Jul 03, 2015 4:23 am
by BillyBoyo
If you could do it with ICETOOL with one input file, why would you ever need JOINKEYS?

I'm not sure what you are trying to verify. Your JOINKEYS as coded will output all records on F1 where any of the four key elements don't match the F2.

So, what exactly do you want?

Re: Jon keys and Syncsort

PostPosted: Tue Jul 07, 2015 2:24 am
by Nara_513
I am trying to do the same functionality using ICETOOL, which am not able to do it, getting wrong output. So wanted to know is it possible to have the same in ICETOOL ? If so can you let me know the sample code.

Thanks

Re: Jon keys and Syncsort

PostPosted: Tue Jul 07, 2015 12:23 pm
by BillyBoyo
And I've already said, if it could be done in ICETOOL, why would JOINKEYS need to exist? Now where do we go? Just keep repeating things?

Why do you want to do it with ICETOOL?

Re: Jon keys and Syncsort

PostPosted: Tue Jul 07, 2015 4:28 pm
by enrico-sorichetti
Why do you want to do it with ICETOOL?


because that' s the requirement :D :D :D