39 proc sort data = employee_info;
40 by IDNumber Expenses;
NOTE: There were 4 observations read from the data set WORK.EMPLOYEE_INFO.
NOTE: The data set WORK.EMPLOYEE_INFO has 4 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
The sort procedure orders the observations in a SAS dataset by the values of one or more character or numeric variables. Here we need to sort the data sequentially by ascending expense values within each ascending IDNumber value. To program this, we need to sort the data by variable IDNumber in ascending order first, then by Expenses. By default, PROC SORT sorts the data in ascending order (so this does not need to be explicitly written).
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.