<?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 LIKE operator not working - if then else in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808057#M40553</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;5         
96         /*put into 3 buckets*/
97         data claims2;
98         set claims;
99         if PracticeName="Unknown" then ProvCategory="Not MMM";
100        else if PracticeName like "SonorTouch%" then ProvCategory="SonorTouchTech";
                                ____
                                388
                                76
ERROR 388-185: Expecting an arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.

101        else ProvCategory="Private";
102        run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;IS there something else to use other than like?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 15 Apr 2022 16:49:32 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2022-04-15T16:49:32Z</dc:date>
    <item>
      <title>LIKE operator not working - if then else</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808057#M40553</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;5         
96         /*put into 3 buckets*/
97         data claims2;
98         set claims;
99         if PracticeName="Unknown" then ProvCategory="Not MMM";
100        else if PracticeName like "SonorTouch%" then ProvCategory="SonorTouchTech";
                                ____
                                388
                                76
ERROR 388-185: Expecting an arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.

101        else ProvCategory="Private";
102        run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;IS there something else to use other than like?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 15 Apr 2022 16:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808057#M40553</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2022-04-15T16:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE operator not working - if then else</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808058#M40554</link>
      <description>&lt;P&gt;LIKE only works in Proc SQL or the WHERE clause in a data step&lt;/P&gt;
&lt;P&gt;If you want to check to see if a value &lt;STRONG&gt;begins&lt;/STRONG&gt; with a specific text value use:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt; else if PracticeName =: "SonorTouch" then ProvCategory="SonorTouchTech";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Note the : after the =, that means "begins with"&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 17:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808058#M40554</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-15T17:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE operator not working - if then else</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808060#M40555</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 17:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIKE-operator-not-working-if-then-else/m-p/808060#M40555</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2022-04-15T17:15:13Z</dc:date>
    </item>
  </channel>
</rss>

