How to replace values of all variables in a SAS data set?

sas

#1

Hi,

I have a data set, having 6 variables. All the variables have entries of missing value. Can you suggest me the way to replace all missing values with 0 efficiently not each column individually?

Thx


#2

@Copernicus_21

I am using array to access all numeric variable(s) using loop and after that change the missing values to 0.

data Test;
set Test;
array Var _numeric_;
            do over Var;
            if Var=. then Var=0;
            end;
run ;

Hope this helps!

Regards,
Sunil