Rick thanks for the example, just using DATA Step to assign the OTHERS for all the observations greater than &numCats, Proc SGPLOT will take care of summation

* * append new level "Others" *;
data other;
set work.freqout;
topCat = &vname;
if _n_ > &numCats then do;
topCat = "OTHERS";
end;
run;