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 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


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