How to use arrays to recode all the numeric variables?
Use _numeric_ and dim functions in array.
data readin;
set outdata;
array Q(*) _numeric_;
do i=1 to dim(Q);
if Q(i)=6 then Q(i)=.;
end;
run;
Note : DIM returns a total count of the number of elements in array dimension Q.