I moved your post to the IML forum.
I believe this post from Rick Wicklin on how to write a function or use built in function.
Proc distance will also calculate the distance.
http://blogs.sas.com/content/iml/2012/02/22/how-to-compute-mahalanobis-distance-in-sas.html
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Latest Updates