Have to compare two datasets with Syncsort



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

Re: Have to compare two datasets

Postby deva_048 » Tue Apr 03, 2012 4:52 pm

//OPT  EXEC PGM=SORT                                   
//SORTJNF1 DD *                                         
  11111                                                 
  22222                                                 
  22222                                                 
//SORTJNF2 DD *                                         
  11111                                                 
  33333                                                 
  22222                                                 
//SORTOUT  DD  DSN=Axxxx.dpak.OUT,DISP=SHR       
//SYSPRINT DD SYSOUT=*                                 
//SYSIN DD *                                           
  JOINKEYS FILE=F1,FIELDS=(1,10,A)                     
  JOINKEYS FILE=F2,FIELDS=(1,10,A)                     
  JOIN UNPAIRED,F1,ONLY                                 
  SORT FIELDS=COPY                                     
/*                                                     



Just now strike it on my mind . Above the JCL are sample requirement for me.
O/P should be :22222 If this is the output then we can fetch those 2lakhs records i think so.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Have to compare two datasets

Postby BillyBoyo » Tue Apr 03, 2012 6:16 pm

And what was the output?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Have to compare two datasets

Postby BillyBoyo » Tue Apr 03, 2012 7:32 pm

OK, I think it is time for you to post your full question, starting from scratch, with all relevant information about files, in either the DFSORT or SyncSort fora, as appropriate.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Have to compare two datasets

Postby NicC » Tue Apr 03, 2012 10:43 pm

//SORTJNF1 DD *                                         
  11111                                                 
  22222                                                 
  22222                                                 
//SORTJNF2 DD *                                         
  11111                                                 
  33333                                                 
  22222

Why do you say that the output should be 22222? It is present in both files and will, therefor, be matched. If you want to get rid of records with duplicate keys then use
SUM FIELDS=NONE
and whatever keyword it is to save the dropped records to a file.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Have to compare two datasets with Syncsort

Postby deva_048 » Wed Apr 04, 2012 7:46 am

We have raw data it is in 1st dataset

NF1 contains9 lakhs records like this structure which has shown below:

APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028


NF2 contains 7 lakh records in this also am containing same records but some 2 lakhs records are excluded need to find those two lakhs records we dont have any unique key also:

APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506963 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506962 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028
APLU027951387 ,161524310 ,1803565,179 ,04/07/2012,8 ,00992501102000506961 ,0400646871093,0400646871093,4,147020074 ,03/29/2012,C,ICM11300,2012-03-29-20.04.54.439028


But 7 th field is changing couple of sets in both datasets

E.G) 00992501102000506963,00992501102000506962,00992501102000506961 it has repeated 5,4,3 times respectively.

Do you have any idea to find those 2 lakh records,

For my understanding we need to compare that fields in both datasets:
E.g)NF1 contains
2222
2222
2222
NF2 contains
2222
2222
O/P
2222

It should be stored in resultant dataset ie) both dataset contains two times repetedly 2222 is there need to exclude only '2222' in first dataset(NF1) . If we can able to find this. So we will try this logic in my scenario whether we can able to exclude those 2 lakh records
That's why gone for join keys i dono the concept but now i understood if it is matching one time in both dataset it doesn't showing in unpaired dataset
SORTJNF1 : RCD IN= 982245,OMITTED= 0,PAIRED= 982245,UNPAIRED= 0
SORTJNF2 : RCD IN= 742926,OMITTED= 0,PAIRED= 742926,UNPAIRED= 0
OR if u have any better idea suggest me.

Thanks in advance.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Have to compare two datasets with Syncsort

Postby BillyBoyo » Wed Apr 04, 2012 11:49 am

DFSORT and Syncsort are different products. They work differently in the sort of task that you want. Without knowing which you are using it is not possible to suggest further. I've asked several times already, but you prefer it to remain a secret for some reason.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Have to compare two datasets with Syncsort

Postby deva_048 » Wed Apr 04, 2012 12:30 pm

see am using pgm=sort not using dfsort or syncsort there is no other reason to keep it as secret. Or you tell which one was better to use for this scenario.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Have to compare two datasets with Syncsort

Postby BillyBoyo » Wed Apr 04, 2012 12:50 pm

Both programs will (likely) be invoked by PGM=SORT, although not usually at the same site.

Look back through this thread for how I suggested you find out which one you are actually using. You need to see the messages from a sort step. Tell us if you see ICE messages or something else.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Have to compare two datasets with Syncsort

Postby deva_048 » Wed Apr 04, 2012 2:29 pm

syncsort only billy.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Have to compare two datasets with Syncsort

Postby BillyBoyo » Wed Apr 04, 2012 2:41 pm

As luck would have it, I don't even have manuals for Syncsort.

Now that you know you have Syncsort, you need to locate the manuals for it.

Despite anything you said earlier, you have no "extra" data on your file 2 (in this big data sample you are using, anyway).

In the documentation it should explain what happens with JOINKEYS where you have duplicates on both files.

This might not in itself be enough for you to resolve the thing. If not, collect all the information that you have been asked for in this thread and post it in a new thread in the Syncsort forum please.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

PreviousNext

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post