Date: Fri, 10 Sep 2010 15:36:30 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: A Missing values problem. OLD SAS version,
CMISS or other functions do not work. Need help to do it in a
data step - thank you
In-Reply-To: <201009102021.o8AGnSx7032720@willow.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
How old of a SAS version are you talking about? Version 6? :)
Solutions in descending order of code required:
* Use CMISS (as said, not available)
* Concatenate each variable with | or some other non-in-data character; then
search string for '||' (ie two consecutive delimiters).
* do _n_ = 1 to dim(chars); if missing(chars[_n_]) then delete; end; (with
array of character variables)
-Joe
On Fri, Sep 10, 2010 at 3:21 PM, Tom Smith <need_sas_help@yahoo.com> wrote:
> I have a following dataset with four character variables: subjet, as, de,
> sw, er. I need
> only those observation in result dataset where there is no variable with
> any missing value.
> I tried with CMISS function. but it did not work since I guess my sas is
> 8.1, can not use a lot of
> fuction. May be we need to use a datastep.
>
> subjet as de sw er
> ------ --- -- -- --
> 101 earth moon sun jupitar
> 101 moon jupitar
> 102 Planet fitness
> 103 LA PA JA SA
> 103 oper bus car
>
> The result should be as below:
>
>
> subjet as de sw er
> ------ --- -- -- --
> 101 earth moon sun jupitar
> 103 LA PA JA SA
>
> Thanks a lot from the bottom of my heart for helping
> me.
>
|