<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: find more than one value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576557#M163212</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if prxmatch('/BLACK|BF|CYBER|PRE WEEK/i',even_name) then .....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Jul 2019 12:36:09 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-07-25T12:36:09Z</dc:date>
    <item>
      <title>find more than one value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576222#M163077</link>
      <description>&lt;P&gt;I am trying to find following value in&amp;nbsp;&lt;/P&gt;&lt;P&gt;('BLACK','BF','CYBER','PRE WEEK')&lt;/P&gt;&lt;P&gt;in event_name and wrote the code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if find(upcase(event_name),('BLACK','BF','CYBER','PRE WEEK')) AND find(upcase(season ),'AW') then EVENT_FLAG='CLEARANCE';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;its showing following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;32         if find(upcase(event_name),('BLACK','BF','CYBER','PRE WEEK')) AND find(upcase(season ),'AW') then EVENT_FLAG='CLEARANCE';
                                              _                        _
                                              79                       22
                                                                       200
              ____
              72
ERROR 79-322: Expecting a ).

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, ;, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, 
              IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, THEN, ^, ^=, |, ||, ~, ~=.  

ERROR 200-322: The symbol is not recognized and will be ignored.

ERROR 72-185: The FIND function call has too many arguments.&lt;/PRE&gt;&lt;P&gt;Can some one help so I can search all these string.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 16:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576222#M163077</guid>
      <dc:creator>Srigyan</dc:creator>
      <dc:date>2019-07-24T16:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: find more than one value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576224#M163078</link>
      <description>&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;if upcase(event_name) in ('BLACK','BF','CYBER','PRE WEEK') AND upcase(season) in ('AW') then EVENT_FLAG='CLEARANCE';&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 16:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576224#M163078</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-07-24T16:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: find more than one value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576379#M163134</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/200312"&gt;@Srigyan&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;You aren't telling us clearly what kind of logic you're trying to implement, nor this is apparent from your code. Let's see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. If, as you say, you want to find whether the &lt;EM&gt;entire string value&lt;/EM&gt; 'BLACK','BF','CYBER','PRE WEEK' (replete with the single quotes) is contained in upcase(event_name), then:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if find (upcase (event_name), "'BLACK','BF','CYBER','PRE WEEK'") and ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. On the other hand, if (as I strongly suspect), you want to find If EVENT_NAME contains &lt;EM&gt;any&lt;/EM&gt; of the &lt;EM&gt;strings&lt;/EM&gt; 'BLACK','BF','CYBER','PRE WEEK', then:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if (find (upcase (event_name), 'BLACK') 
  or find (upcase (event_name), 'BF')
  or find (upcase (event_name), 'CYBER')
  or find (upcase (event_name), 'PRE WEEK')  
) and ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;3.&amp;nbsp;If you want to find If EVENT_NAME contains &lt;EM&gt;any&lt;/EM&gt; of the &lt;EM&gt;words&lt;/EM&gt;&amp;nbsp;'BLACK','BF','CYBER','PRE WEEK', then use the FINDW function instead of FIND.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 21:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576379#M163134</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-07-24T21:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: find more than one value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576557#M163212</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if prxmatch('/BLACK|BF|CYBER|PRE WEEK/i',even_name) then .....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jul 2019 12:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-more-than-one-value/m-p/576557#M163212</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-07-25T12:36:09Z</dc:date>
    </item>
  </channel>
</rss>

