LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Aug 2006 04:10:14 -0400
Reply-To:     Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject:      Re: Missing values to zeros
Comments: To: Rahuldev Sharma <Rahuldev.Sharma@SYMPHONYSV.COM>

Hi Rahul,

I don't think your code is entirely correct: replace If i= . then i=0; by IF Miss(I) = . THEN Miss(I) = 0;

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld

On Mon, 21 Aug 2006 12:53:39 +0530, Rahuldev Sharma <Rahuldev.Sharma@SYMPHONYSV.COM> wrote:

>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


Back to: Top of message | Previous page | Main SAS-L page