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 (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Jul 2004 11:01:32 -0400
Reply-To:   Bob_Abelson@HGSI.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Bob Abelson <Bob_Abelson@HGSI.COM>
Subject:   Re: Converting Missing Value to zero
Content-Type:   text/plain; charset="iso-8859-1"

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


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