118 proc sort data=work.payments out=work.sort_output;
119 by payment;
NOTE: There were 3 observations read from the data set WORK.PAYMENTS.
NOTE: The data set WORK.SORT_OUTPUT has 3 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds
The sort procedure orders the observations in a sas dataset by the values of one or more character or numeric variables. The correct syntax to define the order variable is to use the BY keyword - in this case simply, by payment; The order by keyword would be fitting in a PROC SQL statement (but not here) and the ascending keyword is unnecessary (as this is the default) and would cause an error.
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.