
Why does this SAS program produce an error? proc means data=sashelp.cars mean median min max; by origin; run; It's because SASHELP.CARS is a SAS data set, and SAS data sets observations are stored and processed sequentially, and a BY group operation requires that the observations are already grouped and sorted