How do you get "Retrieving matched duplicate records" out of this:
42 9876 7654
42 9876 5432
42 7654 9876
42 7654 5432
42 5432 9876
42 5432 7654
Define the rules (using words and sentences) for your "match".
Not being much of an EZT person - though it does have some nice key matching capabilities - I can't see how to do this without have the file inputting twice at the same time - or the original and a copy.
Keying off the first, read a record, scan the second for key matches, ignore if value equal and write if key equal and number not.
When the second file at ends (or key break if sorted) close and open the second file and repeat.