Joined: 01 May 2007 Posts: 44 Topics: 22 Location: DOWNTOWN BUFFALO, NY
Posted: Tue Aug 12, 2008 2:10 pm Post subject: SEPARATING DUPLICATES
I have a sequential file LRECL=210 with a SORT KEY @ 180 29 A comprised of CLAIM Id @ 180 11 A, Subscriber @ 191 18 A. I'm using DFSORT here. I want to get ONLY any DUPLICATE CLAIM IDs in an output file. Or get all unique claims in 1 output file and dups in a 2nd output file. So I've sorted the file on 180,29,CH,A and I can see the dups there. How can I leave only the DUPs on SORTOUT ?? Or can I split SORTIN into 2 SORTOU1 & SORTOU2 where SORTOU1 has got all the records except DUPS and SORTOU2 has got ONLY DUPS. I.E. SORTOU1 contains all unique CLAIN IDs and SORTOU2 contains only duplicate Claim IDs??
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Aug 12, 2008 2:36 pm Post subject:
It's not clear what you want to use to determine duplicates. Is it the Claim ID only, or the Claim ID and the Subscriber ID? At any rate, you can use a DFSORT/ICETOOL job like the following to get the unique records in one file and the duplicates in another:
where p and m are the starting position and length, respectively, of the field you want to use to determine duplicates.
If that doesn't give you want you want, then show an example of the records in your input file and what you expect for output, and explain the "rules" for getting from input to output. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum