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 (January 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 31 Jan 2007 18:48:12 -0500
Reply-To:     Don Henderson <donaldjhenderson@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     RFC822 error: <W> MESSAGE-ID field duplicated. Last occurrence
              was retained.
From:         Don Henderson <donaldjhenderson@HOTMAIL.COM>
Subject:      Re: Missing Option in SAS..
In-Reply-To:  <FD746D3C07FB0C478AB951C18CE266A4178927@aaunsw412.au.cbainet.com>
Content-Type: text/plain; charset="us-ascii"

While I absolutely positively agree with David that changing SAS missing values to a valid number is almost always an incredibly bad idea for the reasons he states, there are rare occasions where it may be appropriate. That said however let me also add that one of the things that led to SAS outstripping all its competitors back in the 70s (yes, I am that old and have used SAS that long) was missing values.

But one example where you might want to do this is the case where a blank input value really does mean 0. Many other languages that some of us Jurassic folks remember treated blanks that way. So if that is the case, the solution is to read the data that way using the BZ informat (where BZ stands for "Blanks as Zero").

Regards, -don h

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Johnson, David Sent: Wednesday, January 31, 2007 6:21 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Missing Option in SAS..

There are so many circumstances where this shouldn't be done that I don't think it is a good idea to post the code for changing the data.

There have already been suggestions about using options like "MissText" to change the formatted appearance of the data, and indeed the format procedure will allow you to create a new numeric format that reassigns missing values to zero and nests in an existing SAS format. Searching support.sas.com will produce papers and samples if you look for "formats" and "nesting".

If the change is necessary, and it has only been truly necessary for me on a handful of occasions, then a "Do" loop will allow you to access the numeric columns by using the special array definition "_Numeric_". Within the loop you can then recalculate or redefine values as needed.

However, if you use it to change the missing responses to survey questions, the missing records on dosages, any missing dates, almost any data where 0 is a meaningful response or any other of countless examples, then there will be tears.

SAS provide a sample page on the process above at http://ftp.sas.com/techsup/download/sample/datastep/numeric.html.

Kind regards

David

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Duggempudi, Jeevan K (US - Chicago) Sent: Thursday, 1 February 2007 7:16 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Missing Option in SAS..

Hello all,

Is there a way in SAS to set all the missing values of all the dataset variables to zero? Thanks.

Jeevan

*****Any tax advice included in this written or electronic communication was not intended or written to be used, and it cannot be used by the taxpayer, for the purpose of avoiding any penalties that may be imposed on the taxpayer by any governmental taxing authority or agency*****

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.T.1]

************** IMPORTANT MESSAGE ***************************** This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. **************************************************************


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