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 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 8 Nov 2007 15:47:28 -0600
Reply-To:   Yu Zhang <zhangyu05@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Yu Zhang <zhangyu05@GMAIL.COM>
Subject:   Re: How can I pick up a variable with specific value?
Comments:   To: "Long, Stuart (NIH/NIEHS) [C]" <long3@niehs.nih.gov>
In-Reply-To:   <E003FBE768C3E54B878177233AE3D39001C151AD@NIHCESMLBX6.nih.gov>
Content-Type:   text/plain; charset=ISO-8859-1

On Nov 8, 2007 3:21 PM, Long, Stuart (NIH/NIEHS) [C] <long3@niehs.nih.gov> wrote: > Hi Jane: > > I know you don't want the IF statement, but maybe this will simplify > things for you? It is how I would perform this selection. > > DATA testit; > INPUT a $ 1-3 b c d e f h ; > IF INDEX(CATS(a,b,c,d,e,f,h),"7") NE 0; > CARDS; > aaa 1 3 4 5 6 7 > bbb 3 5 . . . . > ccc 4 7 9 . . . > ddd 2 6 7 . . . > eee 1 5 . . . . > fff 1 . 6 . 5 . > ; > if one of the b,c,d,e,f,h has value of 17 or 71 or some big number with 7 in it will break this program.


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