You have plenty of good suggestions that work for what you have presented.
However, suppose your data set contains additional variables and you would like to preserve some values of those other variables?
Here's a solution that best addresses the issue of "additional variables":
data want;
update have (obs=0) have;
by id category;
run;
... View more