View previous topic :: View next topic
|
Author |
Message |
eric
New User
Joined: 28 Nov 2005 Posts: 3
|
|
|
|
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 |
|
|
k_vikram07
New User
Joined: 23 Nov 2005 Posts: 35
|
|
|
|
//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 |
|
|
eric
New User
Joined: 28 Nov 2005 Posts: 3
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
eric
New User
Joined: 28 Nov 2005 Posts: 3
|
|
|
|
thanks a lot, I will give it a try! |
|
Back to top |
|
|
|