Date: Mon, 21 Aug 2006 12:53:39 +0530
Reply-To: Rahuldev Sharma <Rahuldev.Sharma@SYMPHONYSV.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rahuldev Sharma <Rahuldev.Sharma@SYMPHONYSV.COM>
Subject: Re: Missing values to zeros
Content-Type: text/plain; charset="us-ascii"
Try the following.
This should replace all the missing values of numeric variable by zeros.
Data <datasetsetname>;
Set <datasetname>;
Array miss(*) _numeric_;
Do i=1 to dim(miss);
If i= . then i=0;
End;
Drop I;
Run;
Regards,
Rahul
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
jayesh
Sent: Monday, August 21, 2006 11:54 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Missing values to zeros
Hi ,
Use DECODE function of SQL.
Regards,
Jayesh N
sasguy wrote:
> How can we covert missing values to zeros of around hundred variables
> without using
> if-then-else
> is there any efficient way we can write?
> Thanks in advance
|