Sort the SWIM data set and create the output data set PAIRS. PROC SORT sorts the data set by Gender. This action is required to obtain a separate set of ranks for each group. OUT= creates the output data set PAIRS.


proc sort data=swim out=pairs;
   by gender;
run;