<?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: Alternatives to Index(s1,s2) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137038#M36932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IndexW - index word function&lt;/P&gt;&lt;P&gt;Also, you can use the upcase/upper and compbl function directly, you don't need % or sysfunc as far as I can see. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jun 2014 23:36:37 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-06-10T23:36:37Z</dc:date>
    <item>
      <title>Alternatives to Index(s1,s2)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137037#M36931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having problems using INDEX() function ...&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a string variable which is a space separated list, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s = AGE WEIGHT GENDER HEIGHT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I query a dataset like this:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select variablename&lt;/P&gt;&lt;P&gt;&amp;nbsp; from MYDATASET&lt;/P&gt;&lt;P&gt;&amp;nbsp; where&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; index("%upcase(%sysfunc(compbl(&amp;amp;s)))", compress(upcase(variablename), ' ')) &amp;gt; 0; quit;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I end up getting results like this:&lt;/P&gt;&lt;P&gt;WEIGHT&lt;/P&gt;&lt;P&gt;MAX_WEIGHT&lt;/P&gt;&lt;P&gt;MIN_WEIGHT&lt;/P&gt;&lt;P&gt;ANYTHING_WITH_WEIGHT_IN_IT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a perfect match by word - not pattern. I was thinking of appending a space to either end of the search pattern, but I'm not sure if that's the most elegant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 23:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137037#M36931</guid>
      <dc:creator>JBerry</dc:creator>
      <dc:date>2014-06-10T23:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Index(s1,s2)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137038#M36932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IndexW - index word function&lt;/P&gt;&lt;P&gt;Also, you can use the upcase/upper and compbl function directly, you don't need % or sysfunc as far as I can see. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 23:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137038#M36932</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-06-10T23:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Index(s1,s2)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137039#M36933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks! That's exactly what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 00:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Alternatives-to-Index-s1-s2/m-p/137039#M36933</guid>
      <dc:creator>JBerry</dc:creator>
      <dc:date>2014-06-11T00:20:27Z</dc:date>
    </item>
  </channel>
</rss>

