in reply to matching data with 2 files

I'm not quite sure, whether or not I understand it right. It sounds to me like: My teacher said we have to merge two sorted files into a new sorted file ;-)

Please show us what you already tried and where you failed.