Date:  Wed, 5 Oct 2011 09:01:45 0500 
ReplyTo:  Joe Matise <snoopy369@GMAIL.COM> 
Sender:  "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU> 
From:  Joe Matise <snoopy369@GMAIL.COM> 
Subject:  Re: Do loop 

InReplyTo:  <201110051348.p95AlPDb026217@waikiki.cc.uga.edu> 
ContentType:  text/plain; charset=ISO88591 
Ah, I misplaced the .
data out;
set in;
array values $ value1value45;
if find(''catx('', of value1value45)'', '82962')then found_82962=1;
if (found_82962 and type=2 and source in ('2','3'));
run;
You also need the $ if they're char variables.
Joe
On Wed, Oct 5, 2011 at 8:48 AM, Subscribe SasL Jkr
<jayakumarreddy@gmail.com> wrote:
> I am using your code and my value1value45 are character variables but i get
> an error .
>
> this is the message
>
>
> NOTE: Numeric values have been converted to character values at the places
> given by:
> (Line):(Column).
> 119:4
> NOTE: Character values have been converted to numeric values at the places
> given by:
> (Line):(Column).
> 119:78
> NOTE: Invalid numeric data, ' 0' , at line 119 column 78.
>
> Is there something wrong in the find statement???
>
>
> On Tue, 4 Oct 2011 20:30:00 0500, Joe Matise <snoopy369@GMAIL.COM> wrote:
>
>>Oops, forgot the initial and closing .
>>data out;
>>set in;
>>array values value1value45;
>>if find(''catx('', of value1value45), '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 value1value45;
>>> if find(catx('', of value1value45), '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 SasL 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) value1value45;
>>>> 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
>>>>
>>>
>
