Well, PROC RANK doesn't have a WEIGHT or FREQ statement, so you'll need to use PROC MEANS or UNIVARIATE to calculate the statistic (P20) and then merge it back in to summarize.
Weighted percentile lead to this post FYI
http://blogs.sas.com/content/iml/2016/08/29/weighted-percentiles.html
You could modify the solutuon here to account for BY groups.
https://gist.github.com/statgeek/31316a678433a1db8136
Or this one:
https://github.com/statgeek/SAS-Tutorials/blob/master/add_average_value_to_dataset
I dont seem to have a good reference for merging BY statistics back in ....
... View more