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 (November 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Nov 2006 22:04:28 -0800
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: One more SQL question
In-Reply-To:   <1164140784.086122.171160@k70g2000cwa.googlegroups.com>
Content-Type:   text/plain; format=flowed

xiehz@HOTMAIL.COM replied: > >Hi, Lee, >first of all, you need to change 'NE . AND' into ' NE . AND ',

Good. It won't fix al lthe problems, but it's a start.

>second of all, run " %put &VAR; " and you will find where it's wrong,

Another good point.

>lastly, why don't you use array to do it? > > DATA NEWDATA; > SET labdemo; > array a_var _numeric_; > do i=1 to dim(a_var); > if a_var(i) = . then > delete; > end; > drop i; >run;

Won't this do an OR instead of an AND on the data? I mean, won't this delet8e if *any* of the values is missing, instead of if *all* of the values are missing?

But I think you're on the right track here. I don't see why a macro solution is needed. If the poster just wants to check if all the numerics are missing, why not use the NMISS() function to see if the number of missings is the same as the number of variables listed?

>regards, > >John Xie >

HTCT, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Get free, personalized commercial-free online radio with MSN Radio powered by Pandora http://radio.msn.com/?icid=T002MSN03A07001


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