Sort the data set Grain_Production. 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;