Does file2 contain all the records that are in file1? If so, then a simple script can look for the partial line in file2 and if it is not there then grab it from file2:
If there are too many records to do this, then you might want to ensure that both files are sorted then run either a more advanced script (awk or perl) or write a
Java program to do the work for you.
Regards, Andrew