Pick the solution you want and just include a drop option. e.g.: data have; input id gender :$1. class a b c; datalines; 1 M 1 9 9 9 2 . 1 . . . 3 F 2 9 . 9 . . 3 . . . . F 3 . . . ; run; options missing=' '; data want missing; set have (drop=gender class); if missing(cats(of _all_)) or cats(of _all_)=cats(id) then output missing; else output want; run;
... View more