Thank you to everyone who has responded! Yes, policy number and customer number can both get matched. There could be up to - but no more than - one entry each for both policy number and customer number in file 1, and similarly in file 2 there will be only 1 entry that has either a policy number and customer number that are the same or not the same. The trick is to produce a match only if the amounts match AND there is a match to either policy number or customer number. The size of the data in comparison to data size I normally deal with is small - about 18,000 records on file 1 compared to about 2,000 records on file 2. I know already there will be a lot of non-matches coming out of file 1, and I expect this. From a business perspective, I am more concerned that each record in file 2 has a match, but I also need to know what didn't get matched from file 1. I am attaching sample data - 2 csv files. In this sample data, there should be shown in the output from SAS: 1) one record on file 2 (policy number field) that matches an account number on file 1, and the amounts on each file are equal, so this is a match. (amount of 21.17, 12345678 44445555). 2) one record on file 1 (account number 44445555) whose customer number happens to be the same as the first example, above, and matches to the customer number from file 2. This same customer number just got matched (above) for 21.17, but the amount in file 1 is 125.32, so file 1's record should get treated as a mismatch. 3) one record on file 1 that doesn't have a match in file 2 (amount of 54.67, 22223333). This is a mismatch. 4) one record on file 2 that doesn't have a match in file 1 (amount of 34.98, 11112222 99998888). This is a mismatch. 5) a case (66667777 for 98.77) where all 3 identifiers are the same and the amounts match. This is a match. 6) a case (77778888) where all 3 identifiers are the same, but the amounts don't match. This s a mismatch. Note that on file 1 there will only ever be up to - but no more than - 1 entry that could correspond to the policy number on file 1, and likewise with regards to customer number from file 2.
... View more