![Rank character variables in SAS](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
SAS supports many ways to compute the rank of a numeric variable and to handle tied values. However, sometimes I need to rank the values in a character categorical variable. For example, the values {"Male", "Female", "Male"} have ranks {2, 1, 2} because, in alphabetical order, "Female" is the first-ranked