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 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 4 Oct 2011 20:30:00 -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: Do loop
Comments:   To: Subscribe Sas-L Jkr <jayakumarreddy@gmail.com>
In-Reply-To:   <CAM+YpE9rqjXF7LndS-P34yYqT24GDWcH9D8iVcLeExwPT8isLw@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

Oops, forgot the initial and closing |. data out; set in; array values value1-value45; if find('|'||catx('|', of value1-value45), '|82962|')||'|' then found_82962=1; if (found_82962 and type=2 and source in ('2','3')); run;

On Tue, Oct 4, 2011 at 8:29 PM, Joe Matise <snoopy369@gmail.com> wrote: > data out; > set in; > array values value1-value45; > if find(catx('|', of value1-value45), '|82962|') then found_82962=1; > if (found_82962 and type=2 and source in ('2','3')); > run; > > -Joe > > > On Tue, Oct 4, 2011 at 5:10 PM, Subscribe Sas-L Jkr > <jayakumarreddy@gmail.com> wrote: >> I am trying to check for Variable Name Range list to see if it is equal to a >> value and also have a where clause in my statement >> >> >> data out; >> set in; >> array X (45) value1-value45; >> do i = 1 to 45; >> do while >> ( >> value(i) = '82962' >> ); >> end; >> end; >> TOB = catt( of A B C) >> where Type = '2' >> and (source = '2' or source = '3'); >> run; >> >> i want to see if one of value1 to value45 have 82962 and where type is 2 and >> source is 2 or 3 >> >> is my above program correct? >> >> is it efficient? >> >> i appreciate assistance >> >> thanks >> >> >> thanks >> >> JKR >> >


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