It really is not clear what your output should be. Is it a report that people read or a data set? If a data set would it have 7 records with missing values for several or 3?
Also, are there other variables involved?
This may be one way:
proc sql;
create table want as
select distinct recordid, category
from have;
quit;
Since you don't actually show normally acceptable SAS variable names I'm guessing on those.