This section shows how to use PROC SORT for sorting your data files and how you can perform BY group processing with sorted data. With BY group processing , you can easily perform analyses on multiple groups at once. About the Data We will be using a modified version of the High School and Beyond data in this unit, the same version that was used in the More Statistics unit.
Most procedures generate listings of some kind.
One exception is the SORT procedure. PROC SORT rearranges the order of observations in the SAS file. The following example sorts the hsbstat file so that observations are grouped together by common values for write . We can sort the data on a categorical variable like gender . Recall that there are 109 females, so if we display the 100th - 120th observations and we can check to see if the data appears to be sorted on gender.