Your question is very interesting. How about: data zero;
input name $ score1-score4;
cards;
peter 10 23 0 65
patrick 23 45 0 65
art 34 56 0 56
sharp 34 65 0 86
;
run;
proc stdize data=zero out=_zero missing=999999 reponly;
run;
proc means data=_zero noprint ;
var _numeric_;
output out=drop(drop=_type_ _freq_) sum=;
run;
data _null_;
set drop;
array drop{*} _numeric_;
array drop_list{200} $ 32 _temporary_;
do j=1 to dim(drop) ;
if drop{j} eq 0 then drop_list{j}=vname(drop{j});
end;
call symput('drop_var',catx(' ',of drop_list{*}));
stop;
run;
data want;
set zero(drop=&drop_var);
run;
data want;
set want;
array num{*} _numeric_;
do j=1 to dim(num) ;
if num{j} eq 999999 then num{j}=.;
end;
run;
Ksharp
... View more