|
You could do this:
data yourdata;
set yourdata;
array _numvars[*] _numeric_;
do i=1 to hbound(_numvars);
if _numvars[i]=0 then _numvars[i]=.;
end;
drop i;
run;
But it would be dangerous to do so, because some of those numeric fields
may contain dates. So you will probably have to specify all your variables
in the array.
If all you want is for missing values to display as zeroes on output, use
OPTIONS MISSING="0".
Bob Abelson
HGSI
240 314 4400 x1374
bob_abelson@hgsi.com
Joerg Neumann <neumann@CONSORS.DE>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
07/15/2004 10:53 AM
Please respond to Joerg Neumann
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: Converting Missing Value to zero
Hello everybody,
i have an sas data set with a lot of numeric variable.
I want to convert the missing value . for numeric values to the value
zero.
What is the best way to do this?
Thanks
Jörg Neumann
|