Summary

Procedures

PROC SORT <DATA=SAS-data-set> <OUT=SAS-data-set> <NODUPRECS>;
sorts a SAS data set by the values of variables that are listed in the BY statement. If you specify the OUT= option, the sorted data is stored in a different SAS data set than the input data. The NODUPRECS option tells PROC SORT to eliminate identical observations.

Statements

BY <DESCENDING> variable-1 < . . . <DESCENDING> variable-n>;
in a DATA step, causes SAS to create FIRST. and LAST. variables for each variable named in the BY statement. The value of FIRST.variable-1 is 1 for the first observation with a given BY value, and 0 for other observations. Similarly, the value of LAST.variable-1 is 1 for the last observation for a given BY value, and ...

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.