Author: scdinesh
Subject: Matching and unmatching records
Posted: Tue Feb 07, 2017 12:41 am (GMT 5.5)
Guys, Appreciate your help me on following requirement:
I've 2 input files(not in sorted order) , compare both files with matching key as(1st 4 digits) and create 4 output files: Output File1 with matching records only from input file1 and output File 2 with matching records only from input file2(Although key matches , I need to validate the remaining records latter from the files separately)
Output file 3 with unmatched records from input file1 and Output file 4 with unmatched records from input file2.
Sample Records
Input File1:
2222Keith
1111David
4444Sam
3333Rohit
Input File2:
3778Ruban
3333Rizwan
4444Andrew
5555Travis
Comparison upon key: S.No(1st 4 digit)
Output File1:(match from input File1)
4444Sam
3333Rohit
Output File2:(match from input File2)
3333Rizwan
4444Andrew
Output File3:(un match from input File3)
2222Keith
1111David
Output File4:(unmatch from input File4)
3778Ruban
5555Travis
Thanks for your help
Subject: Matching and unmatching records
Posted: Tue Feb 07, 2017 12:41 am (GMT 5.5)
Guys, Appreciate your help me on following requirement:
I've 2 input files(not in sorted order) , compare both files with matching key as(1st 4 digits) and create 4 output files: Output File1 with matching records only from input file1 and output File 2 with matching records only from input file2(Although key matches , I need to validate the remaining records latter from the files separately)
Output file 3 with unmatched records from input file1 and Output file 4 with unmatched records from input file2.
Sample Records
Input File1:
2222Keith
1111David
4444Sam
3333Rohit
Input File2:
3778Ruban
3333Rizwan
4444Andrew
5555Travis
Comparison upon key: S.No(1st 4 digit)
Output File1:(match from input File1)
4444Sam
3333Rohit
Output File2:(match from input File2)
3333Rizwan
4444Andrew
Output File3:(un match from input File3)
2222Keith
1111David
Output File4:(unmatch from input File4)
3778Ruban
5555Travis
Thanks for your help