I'm curious if SAS has an implementation of the distance measure? I wrote my own once in proc fcmp for fun, but it probably could be greatly improved.