Comapre 2 files and joining the non matching records
Posted: Thu Oct 18, 2012 7:32 pm
Hi..
I need to compare 2 files and write the non matched records to a separate file. Key fields 8 - 10. Input files are already sorted.
My input file 1--> FB having LRECL 80
Mumbai 123....
Chennai234....
Kolkata345....
Punjab 567....
input file 2--> FB having LRECL 80
Mumbai 001....
Chennai234....
Kolkata789....
Punjab 567....
Delhi 567....
Output file --> FB having LRECL 160 should be like below
Mumbai 123....(80 characters) + Mumbai 001....(80 characters) --> 160 record length
Kolkata345....(80 characters) + Kolkata789....80 characters)--> 160 record length
Punjab 567....(80 characters) + spaces(as there are no match records in file 2)--> 160 record length
spaces(as there are no match records in file 2) + Delhi 567....--> 160 record length
Can it be done using Icetool or Sort. Please advice.
I need to compare 2 files and write the non matched records to a separate file. Key fields 8 - 10. Input files are already sorted.
My input file 1--> FB having LRECL 80
Mumbai 123....
Chennai234....
Kolkata345....
Punjab 567....
input file 2--> FB having LRECL 80
Mumbai 001....
Chennai234....
Kolkata789....
Punjab 567....
Delhi 567....
Output file --> FB having LRECL 160 should be like below
Mumbai 123....(80 characters) + Mumbai 001....(80 characters) --> 160 record length
Kolkata345....(80 characters) + Kolkata789....80 characters)--> 160 record length
Punjab 567....(80 characters) + spaces(as there are no match records in file 2)--> 160 record length
spaces(as there are no match records in file 2) + Delhi 567....--> 160 record length
Can it be done using Icetool or Sort. Please advice.