<?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 Choose character variables and find a piece of string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576965#M163401</link>
    <description>&lt;P&gt;I choose any table - I can change it any time. The table has numeric and character variables. I would like to have possibility to search and find any text in character columns, for example by prompt manager, and show all rows for typed text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give me some tips how I should start? I thought about prompts one for type the text, and the second one to choose character variables (but they can change if I change the table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 16:13:57 GMT</pubDate>
    <dc:creator>MargoBlue</dc:creator>
    <dc:date>2019-07-26T16:13:57Z</dc:date>
    <item>
      <title>Choose character variables and find a piece of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576965#M163401</link>
      <description>&lt;P&gt;I choose any table - I can change it any time. The table has numeric and character variables. I would like to have possibility to search and find any text in character columns, for example by prompt manager, and show all rows for typed text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give me some tips how I should start? I thought about prompts one for type the text, and the second one to choose character variables (but they can change if I change the table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576965#M163401</guid>
      <dc:creator>MargoBlue</dc:creator>
      <dc:date>2019-07-26T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Choose character variables and find a piece of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576967#M163402</link>
      <description>&lt;P&gt;I think this is what you want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/33/078.html" target="_blank"&gt;http://support.sas.com/kb/33/078.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576967#M163402</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-07-26T16:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Choose character variables and find a piece of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576969#M163403</link>
      <description>&lt;P&gt;Here is a reference that illustrates how to refer to variables and datasets in a short cut list:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to the _character_ for all variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using something like the following should get you started. X will concatenate all character variables into a single string that you cna then search with FIND/INDEX. Not sure what you want to do after that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x = catx("|", of _character_);
y = find("ValueToFind", x);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282991"&gt;@MargoBlue&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I choose any table - I can change it any time. The table has numeric and character variables. I would like to have possibility to search and find any text in character columns, for example by prompt manager, and show all rows for typed text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you give me some tips how I should start? I thought about prompts one for type the text, and the second one to choose character variables (but they can change if I change the table).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Choose-character-variables-and-find-a-piece-of-string/m-p/576969#M163403</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-26T16:17:20Z</dc:date>
    </item>
  </channel>
</rss>

