Rick, Your code show how to print the result to calculate the Mahalanobis distances from Proc IML Could you show how to create the same result as a SAS dataset? Thank you!