<?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 Search variable for specified text and return flag in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28830#M1114</link>
    <description>Is there a way in SAS to search for specific text in a variable and if found set a flag to 1. I am currently trying to determine if records in my dataset contain the text "TBI Screening". I can do this in MS Access with criteria [Like "*TBI Screening*"] and it works. Just wondering if you can do similar in SAS. The variable used in the search is called note and can contain up to 32000+ characters. Thanks.</description>
    <pubDate>Wed, 02 Jul 2008 13:36:46 GMT</pubDate>
    <dc:creator>WAL83</dc:creator>
    <dc:date>2008-07-02T13:36:46Z</dc:date>
    <item>
      <title>Search variable for specified text and return flag</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28830#M1114</link>
      <description>Is there a way in SAS to search for specific text in a variable and if found set a flag to 1. I am currently trying to determine if records in my dataset contain the text "TBI Screening". I can do this in MS Access with criteria [Like "*TBI Screening*"] and it works. Just wondering if you can do similar in SAS. The variable used in the search is called note and can contain up to 32000+ characters. Thanks.</description>
      <pubDate>Wed, 02 Jul 2008 13:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28830#M1114</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2008-07-02T13:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Search variable for specified text and return flag</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28831#M1115</link>
      <description>Check the INDEX, INDEXW and (more flexible but more complicated to write) PRXMATCH functions.&lt;BR /&gt;
They all return a positive number when the string is found, else a zero. So you can build :&lt;BR /&gt;
[pre]&lt;BR /&gt;
flag = (INDEX(note, "TBI Screening") &amp;gt; 0) ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
This FLAG variable will be 1 or 0.</description>
      <pubDate>Wed, 02 Jul 2008 15:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28831#M1115</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-02T15:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search variable for specified text and return flag</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28832#M1116</link>
      <description>Thanks for the info. I was out of town or would have gotten back sooner.</description>
      <pubDate>Tue, 08 Jul 2008 19:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Search-variable-for-specified-text-and-return-flag/m-p/28832#M1116</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2008-07-08T19:50:09Z</dc:date>
    </item>
  </channel>
</rss>

