Date: Mon, 19 Nov 2001 16:24:58 -0500
Reply-To: "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject: Re: Missing Values
Content-Type: text/plain; charset="iso-8859-1"
> From: Tift, Brian [mailto:bet5@CDC.GOV]
> A user has set invalid / missing values in her data set to 888 or 999.
> She now wants to run a proc means on some variables but does
> not want the 888's or 999's included. Is there a simple option that
> will tell SAS to treat these values a missing, and
> thus not included in the analysis.
you can cleanse the report with a format:
%LET MISSING = MISSING;
.,888,999 = "&MISSING.";
proc WHATEVER data = LIB.X;
format Var-w/special-missing Zap8_9_.;
You may have to play with the spelling of 'missing'
in order to get it to conform to SAS's version of 'missing'.
on a FREQ, you -include- missing with this option
proc FREQ data = LIB.X;
/ list missing;
or perhaps this:
proc WHATEVER data = LIB.X
(where = (put(Var,Zap8_9_.) ne "&MISSING.");
Note use of macro variable to standardize string.
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
OpSys: Win_Pro Ver: 8.2
---> cheerful provider of UNTESTED SAS code from the KludgeWrx !*! <---
e-mail your SAS improvements to: email@example.com
By using your intelligence
you can sometimes make your problems twice as complicated.
-- Ashleigh Brilliant
By using their intelligence
they can sometimes make your problems twice as complicated.