Joined: 04 May 2006 Posts: 10 Topics: 6 Location: India
Posted: Sat Aug 23, 2008 4:34 am Post subject: Icetool + get duplicates based on two fields.
Hi,
I need some help on ICETOOL. I have a dataset with Customer#, Old Emp Id and New Emp ID as shown below
Cust# Old Emp ID New Emp ID
11111 aaaaaa bbbbb
11111 bbbbbb ccccc
11111 bbbbbb ddddd
11111 cccccc eeeee
11111 dddddd eeeee
22222 aaaaaa ddddd
22222 bbbbbb ddddd
33333 cccccc aaaaa
I want the duplicates in (Cust# and Old Emp ID) and (Cust# and New Emp Id) in a new file.
With Select and Nodups option I was able to get the duplicates in Old Emp ID and New Emp ID alone but I need to check the concatenated key (Cust# and Old Emp ID) and (Cust# and New Emp Id) and is there a way to give two field positions in the ON parameter?
I also want the header to be printed and used the Display and Header option, similarly is there a way to print the trailer with count of duplicate records alone? Kindly help.
Output:
Duplicates in Old Emp ID
Cust# Old Emp ID New Emp ID
11111 bbbbbb ccccc
11111 bbbbbb ddddd
Duplicates : 2
Duplicates in New Emp ID
Cust# Old Emp ID New Emp ID
11111 cccccc eeeee
11111 dddddd eeeee
22222 aaaaaa ddddd
22222 bbbbbb ddddd
Duplicates : 4 _________________ Regards,
Subha
With Select and Nodups option I was able to get the dup
That would be SELECT with ALLDUPS, not NODUPS.
Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed you want the carriage control characters for the report, but if not add REMOVECC to each OUTFIL statement. Also, it wasn't clear where your fields started in the input records, so I guessed - adjust as needed.
_________________ 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