Create a separate set of ranks for each BY group. The BY statement separates the rankings by Gender.
by gender;