Code:
File A
Digits,Charged,Duration
555,60,60
555555,10,10
5558,6,3
5558888,12,6
55558,3,1
5555877,6,2
445,40,10
445555,44,11
6665,50,10
6665555,10,2
66665,20,10
File B
Digits,Rate,Pulse
555,1,1
5558,2,1
55558,3,1
445,4,1
6665,5,1
Ouput File
Digits,Charged,Duration,Digits_B,Rate_B,Pulse_B,Remarks
555,60,60,555,1,1,Digits 555 in FileA exactly matches with555 in FileB
555555,10,10,555,1,1,Digits 555555 in FileA best matches with 555 in FileB
5558,6,3,5558,2,1,Digits 5558 in FileA exactly matches with 5558 in FileB
5558888,12,6,5558,2,1,Digits 5558888 in FileA best matches with 5558 in FileB
55558,3,1,55558,3,1,Digits 55558 in FileA exactly matches with 55558 in FileB
5555877,6,2,55558,3,1,Digits 5555877 in FileA best matches with 55558 in FileB
445,40,10,445,4,1,--exact match--
445555,44,11,445,4,1,----best match---
6665,50,10,6665,5,1,--exact match--
6665555,10,2,6665,5,1,----best match---
66665,20,10,NA,NA,NA,Not present in File B