SAS contains a standard tool for processing a group of variables in the same way. Arrays do that:
data want;
set have;
array vars {4} a b c d;
do _n_=1 to 4;
if vars{_n_}=1 then vars{_n_}=10;
end;
run;
You'll need to type all your IF/THEN statements once. Then the DO loop changes one variable at a time, applying all the logic between DO and END.
... View more