<?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: find function in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170489#M13060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly the problem&lt;BR /&gt;I guess I may have to stick with Find function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2014 21:27:24 GMT</pubDate>
    <dc:creator>avatar</dc:creator>
    <dc:date>2014-11-13T21:27:24Z</dc:date>
    <item>
      <title>find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170484#M13055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am interested to delete some drugs in a string (occuring in the middle of the string that has drug name) . I used find function like below. it works however&amp;nbsp; I have a long list of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if find (therapy, 'ACTEMRA') then delete;&lt;/P&gt;&lt;P&gt;if find (therapy, 'AVASTIN') then delete;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if find (therapy, 'AVEED') then delete;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if find (therapy, 'BOTOX') then delete;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if find (therapy, 'DACOGEN') then delete;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to combine all and more drugs in one statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 19:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170484#M13055</guid>
      <dc:creator>avatar</dc:creator>
      <dc:date>2014-11-13T19:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170485#M13056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this may help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array del(5) ACTEMRA AVASTIN AVEED BOTOX DACOGEN;&lt;/P&gt;&lt;P&gt;&amp;nbsp; counter=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to dim(del);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if find(therapy,vname(del(i)), 'i') then counter+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if counter&amp;gt;=1 then delete;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 19:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170485#M13056</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-11-13T19:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170486#M13057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't mind some Perl Regular Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'/(ACTEMRA|AVASTIN|AVEED|BOTOX|DACOGEN)/'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, var);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Haikuo &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 19:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170486#M13057</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-11-13T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170487#M13058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have(where=(therapy not in ('ACTEMRA' 'AVASTIN' 'AVEED' 'BOTOX' 'DACOGEN')));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 20:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170487#M13058</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-11-13T20:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170488#M13059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IN will not work if the variable value actually is "AVASTIN 10MG" or similar additional information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 20:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170488#M13059</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-11-13T20:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170489#M13060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly the problem&lt;BR /&gt;I guess I may have to stick with Find function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170489#M13060</guid>
      <dc:creator>avatar</dc:creator>
      <dc:date>2014-11-13T21:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: find function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170490#M13061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A modification of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: SAS Monospace;"&gt;&amp;nbsp; array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt; del{&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: SAS Monospace;"&gt;5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;} $ &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: SAS Monospace;"&gt;_temporary_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: SAS Monospace;"&gt;'ACTEMRA'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: SAS Monospace;"&gt;'AVASTIN'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: SAS Monospace;"&gt;'AVEED'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: SAS Monospace;"&gt;'BOTOX'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: SAS Monospace;"&gt;'DACOGEN'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: SAS Monospace;"&gt;); /* add the values and update the number in the array reference&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; counter=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to dim(del);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if find(therapy,del(i)) then counter+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if counter&amp;gt;=1 then delete;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop i counter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/find-function/m-p/170490#M13061</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-11-13T21:41:52Z</dc:date>
    </item>
  </channel>
</rss>

