<?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 Word function Index() in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363640#M86139</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to take all records with word "Income" in column Item . And the below code somehow fail! SAS return no record for data Want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
	data Want; set Have;
	if Index(item,"Income")=1 ; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I take a row&amp;nbsp;full value ("42700 · Consulting Income") and try to see if SAS work with full value. And SAS correctly pick the row as code below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	data check1; set PL;
	if Index(item,"42700 · Consulting Income")=1 ; run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone help me to correct my original code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that caused by the little dot in the string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2017 22:30:40 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-06-01T22:30:40Z</dc:date>
    <item>
      <title>Word function Index()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363640#M86139</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to take all records with word "Income" in column Item . And the below code somehow fail! SAS return no record for data Want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
	data Want; set Have;
	if Index(item,"Income")=1 ; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I take a row&amp;nbsp;full value ("42700 · Consulting Income") and try to see if SAS work with full value. And SAS correctly pick the row as code below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	data check1; set PL;
	if Index(item,"42700 · Consulting Income")=1 ; run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone help me to correct my original code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that caused by the little dot in the string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 22:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363640#M86139</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-06-01T22:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Word function Index()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363641#M86140</link>
      <description>&lt;P&gt;&lt;SPAN class="token keyword"&gt;One means it sees&amp;nbsp; the only in starting position, so change it to greater than zero, it can find value anywhere&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Index&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Income"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&amp;gt;0&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 22:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363641#M86140</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-01T22:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Word function Index()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363642#M86141</link>
      <description>OMG, great thanks to you.&lt;BR /&gt;HC</description>
      <pubDate>Thu, 01 Jun 2017 22:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Word-function-Index/m-p/363642#M86141</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-06-01T22:32:08Z</dc:date>
    </item>
  </channel>
</rss>

