Storing SSN data plain text? Shame! As someone who has had their identity stolen, i strongly urge you to consider using an alternate identifier. Seriously. Now is the time.
Perhaps you can construct 2 sample data files -- minus any personal information of course -- and post a portion of your algorithm along with it. By breaking your problem down, you often find your own solution but at the least you have a better chance of receiving meaningful answers, sooner.
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)