<?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 Error using LIKE operator in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586738#M167498</link>
    <description>&lt;P&gt;I'm trying to resolve the error as mentioned below but I'm unable to do it. SCHDLD_OBJ_NM is the variable which I'm creating in the same datastep where I placed the below if condition and I was asked to achieve this one single step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4219       if SCHDLD_OBJ_NM like %"_AP_"% then FNCTL_CMPNT_NM="AP" else "LIS";
                            ____                                     ____
                            388                                      388
                            202                                      202
ERROR 388-185: Expecting an arithmetic operator.

ERROR 202-322: The option or parameter is not recognized and will be ignored.

4220       run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Sep 2019 12:58:14 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2019-09-06T12:58:14Z</dc:date>
    <item>
      <title>Error using LIKE operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586738#M167498</link>
      <description>&lt;P&gt;I'm trying to resolve the error as mentioned below but I'm unable to do it. SCHDLD_OBJ_NM is the variable which I'm creating in the same datastep where I placed the below if condition and I was asked to achieve this one single step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4219       if SCHDLD_OBJ_NM like %"_AP_"% then FNCTL_CMPNT_NM="AP" else "LIS";
                            ____                                     ____
                            388                                      388
                            202                                      202
ERROR 388-185: Expecting an arithmetic operator.

ERROR 202-322: The option or parameter is not recognized and will be ignored.

4220       run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 12:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586738#M167498</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2019-09-06T12:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error using LIKE operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586740#M167500</link>
      <description>&lt;P&gt;You use the Like Operator in a Where Statement. If you want to apply the logic in an If Statement, then read&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/43/303.html" target="_self"&gt;Sample&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;43303:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;Using the equivalent of CONTAINS and LIKE in an IF statement&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 13:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586740#M167500</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-06T13:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error using LIKE operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586742#M167502</link>
      <description>&lt;P&gt;You can also try IFC function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FNCTL_CMPNT_NM=ifc(indexw(SCHDLD_OBJ_NM,"_AP_"),'AP','LIS');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 13:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586742#M167502</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-06T13:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error using LIKE operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586893#M167544</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;LIKE doesn't like IF, plus your double quotes are extraneous.&lt;/P&gt;
&lt;P&gt;Use the FIND function instead. Also, if&amp;nbsp;FNCTL_CMPNT_NM is a new variable not yet seen by the compiler, either declare it in the LENGTH statement as $3 beforehand or &lt;EM&gt;reverse the order&lt;/EM&gt; in which the compiler sees "AP" and "LIS"; otherwise your "LIS" will be truncated to "LI" when "_AP_" is not found in&amp;nbsp;&lt;SPAN&gt;SCHDLD_OBJ_NM:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;if find (SCHDLD_OBJ_NM, "_AP_") &lt;FONT color="#800000"&gt;&lt;STRONG&gt;= 0&lt;/STRONG&gt;&lt;/FONT&gt; then FNCTL_CMPNT_NM = "&lt;FONT color="#800000"&gt;&lt;STRONG&gt;LIS&lt;/STRONG&gt;&lt;/FONT&gt;" ;                                                                                                                                                                                               
else FNCTL_CMPNT_NM = "&lt;FONT color="#800000"&gt;&lt;STRONG&gt;AP&lt;/STRONG&gt;&lt;/FONT&gt;" ;                                         
&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Paul D.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 21:59:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-using-LIKE-operator/m-p/586893#M167544</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-09-06T21:59:52Z</dc:date>
    </item>
  </channel>
</rss>

