I need a program that will match the two files and produce a new tran file that contains only the records that did 'not' have a matching master.
The master file will not have any duplicates.
The program you need is very simple. It has been used for many years as a simple teaching exercise.
Assuming both files are are in the same sequence, do a priming read to both files and then loop around a compare of both.
When equal read again, when one is lower read it, when the other is lower, read that one.
Eventually you will have eof on both.
In the loop is where you can determine if the tran file did not have a matching master.