LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Oct 2008 07:53:11 -0700
Reply-To:     alexander.konn@GMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         alexander.konn@GMAIL.COM
Organization: http://groups.google.com
Subject:      Re: Keep observations if at least one var in a list have is non
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Oct 29, 12:24 pm, franz_cl2...@yahoo.fr (Franz) wrote: > Dear all, > > I am dealing with a data set with lots of variables. How do I express the fact that observations must be kept if any of the variable value in a specific list (for example: var1, yyw, var2, zzt, yy3, tt4) is not missing? > > I hope you get what I mean. > > Thanks & Kind regards, > Franz

Not elegant, but working:

data test; input id var1 - var5; datalines; 1 . . . . . 2 . 1 . . . 3 . . . . . 4 1 1 1 1 1 5 . . . . 1 ;

data test1; set test; array xx (*) var1 - var5; do i = 1 to dim(xx); if not missing(xx(i)) then do; output; leave; end; end; drop i; run;

Hope this helps, Alex


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