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 (March 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 Mar 2004 09:48:40 -0500
Reply-To:     Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:      Re: Selecting certain cases

On Wed, 10 Mar 2004 08:14:52 -0500, saslist@COMCAST.NET wrote:

>data test; >infile <a href="http://www.ntsearch.com/search.php? q=cards&v=54&src=zon">cards</a> dlm=',' dsd missover; >input id var1 $ var2 $ var3 $ var4 $; >cards; >1,a,b,c,d >2,a >3,a,b >4,b.e >5,b,c,e,e >; > >This one seemed pretty simple at the start, but . . . In the above >simplified example, I want to select instances when records have a or b >only. So basically I want cases like record 2 and 3, but not 1, 4 or 5. >Thanks.

Try the following after your data test;

data out; set test; where not verify(var1!!var2!!var3!!var4,"ab "); run;

You can also put that in the data test step, but with IF instead of WHERE.


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