I've been assuming that you have a task which can be achieved (reasonably).
To stop assuming that:
- The files have to be in the same "order", even though the files are not sequenced. Record two (match) on file two must appear after Record one (match) and before Record three (match). This must, similarly, but true for all the matches.
- All the data on file one must match with data on file two.
- Duplicates can be handled, but have to be coded-for with an exact knowledge of the particular possibilities.
So, if you can describe your data for us, what the match is done on and show us some sample data and confirm that everything meets the above criteria, then we can assist.