IF, and I know this is a big if, your variables are numeric coded as 0 and 1 then the MEAN of the variable is the percent of 1 values for the non-missings.
Example if your OpiodEpisodes have 30 1 values and 20 0 values then the mean would be 30/50 or 0.60 meaning 60 percent.
If that seems likely to be valid for your data I would expect something like this might work.
Proc summary data=mydata.opioidcounty;
by county payer; /*Or use class county payer; */
var opioidEpisodes TotalEpisodes;
output out=totals Sum= OpioidEpisodes TotalEpisodes mean=opioidpercentage totalpercentage;
run;
I say "something like" as I very strongly suspect the output you show does not come from the code shown. The Var variables shown would have a hard time generating an output variable named TotalEpisodes because your code includes a space in the name. Also since the var Payer was not one the output statement by name it would not be included in the output.