Proc SORT syntax
PROC SORT [DATA=input-data-file] [OUT=output-data-file];
BY [descending] variable-name [...[descending] variable-name];
input-data-file specifies the SAS data set to be read by the procedure. If it is not specified, the last data set created will be used as input.
output-data-file specifies the SAS data set to be written by the procedure. If it is not specified, the reordered data file is given the same name as the input data set.
The BY statement is required.
The BY variables specify the hierarchical sorted order. Any number of variables may be used. By default, the data is sorted in ascending order. If a descending sorted order is desired, use
BY DESCENDING variable-name; Only the variable immediately following DESCENDING is affected.
|