I've got two files
file1
123|Patrick Smith|123 anystreet|Detroit|MI 456|John Jackson|456 cloverlane|Cleveland|OH 012|Jim Jones|654 Cadillac|Baltimore|MA
file2
123|Patrick Smith|123 anystreet|Detroit|MI 789|Suzy Q|321 Olive St|Chicago|IL 012|Jim Jones|654 Cadillac|Gainesville|FL
I need file3 to contain:
a) records in file1 not in file2 (456|John Jackson|456 cloverlane|Cleveland|OH) b) records in file2 not in file1 (789|Suzy Q|321 Olive St|Chicago|IL) c) records in file2 with change from file1 (012|Jim Jones|654 Cadillac|Gainesville|FL) d) records in file1 in file2 (123|Patrick Smith|123 anystreet|Detroit|MI )
key to file is field 1
output should contain something with D (Delete), I (Insert), U (Update), N (No Change)
D|456|John Jackson|456 cloverlane|Cleveland|OH I|789|Suzy Q|321 Olive St|Chicago|IL U|012|Jim Jones|654 Cadillac|Gainesville|FL N|123|Patrick Smith|123 anystreet|Detroit|MI
thanks for any help