Date: Thu, 1 Feb 2007 10:20:50 +1100
Reply-To: "Johnson, David" <David.Johnson@CBA.COM.AU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Johnson, David" <David.Johnson@CBA.COM.AU>
Subject: Re: Missing Option in SAS..
Content-Type: text/plain; charset="us-ascii"
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.
**************************************************************