You most likely need to link your files on a more unique key. This will eliminate the duplicates. Check for similar fields it the other files and join on those as well. An example would be say an order header file and detail file may contain a filed like order level. If you just join on order number you will pick up all order levels in the detail when lookin for order 1 level 1. When when the next order level is read from the header, order 1 level 2 you will pick up ALL the same data from the order detail. So in this example, join on order number and order level to eliminate duplicates.