PROC SORT sorts the data first by values of Year, then by values of Country, and finally by values of Type.
proc sort data=grain_production;
   by year country type;
run;