Sort the input data set PIESALES. PROC SORT sorts PIESALES by year. Sorting is required to produce a separate chart for each year.
proc sort data=piesales out=sorted_piesales; by year; run;