<?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: Selecting one unit in a string of units in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802862#M33295</link>
    <description>&lt;P&gt;The index function may be the easiest for single letters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=yourdata;
    table var;
   where index(var,'A') &amp;gt; 0;
run;&lt;/PRE&gt;
&lt;P&gt;The Index function returns the position, number of character in the string, as an integer if found or zero if not found. The first parameter is what to search and the second parameter is what you&amp;nbsp; search for. This is case sensitive and would not find 'a' when searching for 'A'.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 20:26:53 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-03-18T20:26:53Z</dc:date>
    <item>
      <title>Selecting one unit in a string of units</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802858#M33294</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable field that has 8 slots for 8 optional answers (A-H).&amp;nbsp; They are not always in the same place, so I can't use substr.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I basically need to select all individuals who have an 'A' anywhere in the variable.&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq;&lt;/P&gt;&lt;P&gt;table var;&lt;/P&gt;&lt;P&gt;where var contains A;&amp;nbsp; (How do I say this in SAS?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for any assistance!&amp;nbsp; I've been having trouble with the right search terms for google.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Julia&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 20:12:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802858#M33294</guid>
      <dc:creator>juliagoolia</dc:creator>
      <dc:date>2022-03-18T20:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting one unit in a string of units</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802862#M33295</link>
      <description>&lt;P&gt;The index function may be the easiest for single letters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=yourdata;
    table var;
   where index(var,'A') &amp;gt; 0;
run;&lt;/PRE&gt;
&lt;P&gt;The Index function returns the position, number of character in the string, as an integer if found or zero if not found. The first parameter is what to search and the second parameter is what you&amp;nbsp; search for. This is case sensitive and would not find 'a' when searching for 'A'.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 20:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802862#M33295</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-18T20:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting one unit in a string of units</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802992#M33298</link>
      <description>&lt;P&gt;you can also use prxmatch&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 16:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-one-unit-in-a-string-of-units/m-p/802992#M33298</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-03-20T16:30:11Z</dc:date>
    </item>
  </channel>
</rss>

