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
 

 

How to find out the duplicate records in two files?

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

New User


Joined: 28 Nov 2005
Posts: 3

PostPosted: Mon Nov 28, 2005 12:34 pm    Post subject: How to find out the duplicate records in two files?
Reply with quote

Now, there are two qsam files with the same layout, I need to find out the duplicate records from the two files, could someone give me a sample?
It's highly appreciated.
Back to top
View user's profile Send private message

k_vikram07

New User


Joined: 23 Nov 2005
Posts: 35

PostPosted: Mon Nov 28, 2005 2:36 pm    Post subject:
Reply with quote

//sortin dd dsn=qsam1,disp=shr
// dd dsn=qsam2,disp=shr
//sortout dd dsn=temp,disp=(,catlg)
....
//sortxsum dd dsn=dups,disp=(,catlg)
//sysin dd *
sort fields=(your key def for finding duplicate)
sum fields=none,xsum
/*

This works if u use syncsort and want to find all duplicates of both files.

thanks
vik.
Back to top
View user's profile Send private message
eric

New User


Joined: 28 Nov 2005
Posts: 3

PostPosted: Mon Nov 28, 2005 2:56 pm    Post subject:
Reply with quote

Vik,

Thanks for your help, however I haven't used the 'syncsort' and can't ensure the 'syncsort' is available in my environment, could you give me
a example for 'SORT'? That would be very appreciated.

Thanks
Eric
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Nov 28, 2005 3:33 pm    Post subject: Re: How to find out the duplicate records in two files?
Reply with quote

For DFSORT...

Code:
//SORT     EXEC PGM=ICETOOL                   
//TOOLMSG   DD SYSOUT=*                       
//DFSMSG    DD SYSOUT=*                       
//IN     DD DSN=RECORDS.INPUT,DISP=SHR
//OUT    DD DSN=RECORDS.OUT,     
//          DISP=(,KEEP,DELETE)             
//TOOLIN DD *                                 
  SELECT FROM(IN) TO(OUT) ON(1,L,CH) ALLDUPS 
//


*L= Record Length.

Regards,

Priyesh.
Back to top
View user's profile Send private message
eric

New User


Joined: 28 Nov 2005
Posts: 3

PostPosted: Mon Nov 28, 2005 3:47 pm    Post subject:
Reply with quote

thanks a lot, I will give it a try! icon_biggrin.gif
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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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