<?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 function like don't work in data step, if clause in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74399#M21576</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I need to swap "sql like" function for a similar one on the "data step if clause".&lt;BR /&gt;
&lt;BR /&gt;
Ex.: &lt;BR /&gt;
proc sql;&lt;BR /&gt;
select&lt;BR /&gt;
case &lt;BR /&gt;
      when descr_job like '%DOC%' then 'Doctor'&lt;BR /&gt;
      else '' &lt;BR /&gt;
end as group&lt;BR /&gt;
from employees&lt;BR /&gt;
&lt;BR /&gt;
Ex.: &lt;BR /&gt;
data new_employees;&lt;BR /&gt;
set employees;&lt;BR /&gt;
&lt;BR /&gt;
if descr_job like '%DOC%' then group = 'Doctor';&lt;BR /&gt;
else group = '';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Obs.: This data step don't work in SAS 8.2.&lt;BR /&gt;
&lt;BR /&gt;
What fuction can i use in this case?</description>
    <pubDate>Mon, 05 Oct 2009 20:23:20 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-10-05T20:23:20Z</dc:date>
    <item>
      <title>function like don't work in data step, if clause</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74399#M21576</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I need to swap "sql like" function for a similar one on the "data step if clause".&lt;BR /&gt;
&lt;BR /&gt;
Ex.: &lt;BR /&gt;
proc sql;&lt;BR /&gt;
select&lt;BR /&gt;
case &lt;BR /&gt;
      when descr_job like '%DOC%' then 'Doctor'&lt;BR /&gt;
      else '' &lt;BR /&gt;
end as group&lt;BR /&gt;
from employees&lt;BR /&gt;
&lt;BR /&gt;
Ex.: &lt;BR /&gt;
data new_employees;&lt;BR /&gt;
set employees;&lt;BR /&gt;
&lt;BR /&gt;
if descr_job like '%DOC%' then group = 'Doctor';&lt;BR /&gt;
else group = '';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Obs.: This data step don't work in SAS 8.2.&lt;BR /&gt;
&lt;BR /&gt;
What fuction can i use in this case?</description>
      <pubDate>Mon, 05 Oct 2009 20:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74399#M21576</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-05T20:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: function like don't work in data step, if clause</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74400#M21577</link>
      <description>Do you not have access to SAS Documentation?  Consider the INDEX function.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS v8 DOC  (not a very clean interface)&lt;BR /&gt;
&lt;A href="http://v8doc.sas.com/sashtml/" target="_blank"&gt;http://v8doc.sas.com/sashtml/&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS 9 DOC&lt;BR /&gt;
&lt;A href="http://support.sas.com/onlinedoc/913/docMainpage.jsp" target="_blank"&gt;http://support.sas.com/onlinedoc/913/docMainpage.jsp&lt;/A&gt;?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Current SAS DOC starter page:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/base/index.html" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/base/index.html&lt;/A&gt;</description>
      <pubDate>Mon, 05 Oct 2009 21:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74400#M21577</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-05T21:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: function like don't work in data step, if clause</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74401#M21578</link>
      <description>As Scott said.&lt;BR /&gt;
&lt;BR /&gt;
Also, like is for where clauses only.</description>
      <pubDate>Tue, 06 Oct 2009 00:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74401#M21578</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-10-06T00:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: function like don't work in data step, if clause</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74402#M21579</link>
      <description>I used the index function and this work&lt;BR /&gt;
&lt;BR /&gt;
tks</description>
      <pubDate>Wed, 28 Oct 2009 13:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/function-like-don-t-work-in-data-step-if-clause/m-p/74402#M21579</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T13:32:55Z</dc:date>
    </item>
  </channel>
</rss>

