<?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: Not Contains in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71036#M15353</link>
    <description>The "NE" operator is either an exact-match or by adding ":" tests a prefix value.  The "NOT CONTAINS" tests/scans the specified SAS variable for the argument string, as coded in your example.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
+"not contains" site:sas.com</description>
    <pubDate>Fri, 26 Mar 2010 13:27:31 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-03-26T13:27:31Z</dc:date>
    <item>
      <title>Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71033#M15350</link>
      <description>if (trim(put(Name,test30.)) not contains  ('RICHARD NU')) ;&lt;BR /&gt;
 &lt;BR /&gt;
test30. is a format  from format dataset.&lt;BR /&gt;
&lt;BR /&gt;
When I am trying as above I am getting error as &lt;BR /&gt;
Syntax error, expecting one of the following: &amp;lt;, &amp;lt;=, =, &amp;gt;, &amp;gt;=, EQ, GE, GT, LE,&lt;BR /&gt;
              LT, NE, NG, NL, ^=, ~=.&lt;BR /&gt;
but I dont want to use NE . I should use 'not contains' . Is it possible with 'not contains'?  Thanks .</description>
      <pubDate>Thu, 25 Mar 2010 11:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71033#M15350</guid>
      <dc:creator>SASACC</dc:creator>
      <dc:date>2010-03-25T11:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71034#M15351</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
The (not) Contains condtion is to be used within a Proc SQL statement and cannot be used within a datastep.&lt;BR /&gt;
&lt;BR /&gt;
Hope it helps.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards,&lt;BR /&gt;
Florent&lt;BR /&gt;
&lt;BR /&gt;
Example:&lt;BR /&gt;
--------------&lt;BR /&gt;
Proc sql;&lt;BR /&gt;
    create table &lt;TABLE_NAME1&gt; as&lt;BR /&gt;
           select *&lt;BR /&gt;
           from &lt;TABLE_NAME2&gt;&lt;BR /&gt;
           where (trim(put(Name,test30.)) not contains ('RICHARD NU')) ;&lt;BR /&gt;
quit;&lt;/TABLE_NAME2&gt;&lt;/TABLE_NAME1&gt;</description>
      <pubDate>Thu, 25 Mar 2010 11:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71034#M15351</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2010-03-25T11:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71035#M15352</link>
      <description>Excuse me, what it's the difference between NE and not contains ?</description>
      <pubDate>Fri, 26 Mar 2010 12:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71035#M15352</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-26T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71036#M15353</link>
      <description>The "NE" operator is either an exact-match or by adding ":" tests a prefix value.  The "NOT CONTAINS" tests/scans the specified SAS variable for the argument string, as coded in your example.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
+"not contains" site:sas.com</description>
      <pubDate>Fri, 26 Mar 2010 13:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71036#M15353</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-26T13:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71037#M15354</link>
      <description>&lt;P&gt;&lt;EM&gt;Editor's Note: The CONTAINS operator is valid in a WHERE clause, not an IF statement. As shown by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12"&gt;@deleted_user&lt;/a&gt;, using the INDEX or the FIND functions provide the closest equivalent. There is also a SAS Note, &lt;A href="http://support.sas.com/kb/43/303.html" target="_self"&gt;Sample 43303&lt;/A&gt;,&amp;nbsp;that discusses this.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming this is data step code, either one of the find() or index() functions should produce the desired result:&lt;BR /&gt; &lt;BR /&gt; if index((trim(put(Name,test30.)) , 'RICHARD NU');&lt;BR /&gt; &lt;BR /&gt; See the documentation for more details.&lt;BR /&gt; &lt;BR /&gt; Jonathan&lt;BR /&gt; &lt;BR /&gt; &amp;gt; if (trim(put(Name,test30.)) not contains ('RICHARD&lt;BR /&gt; &amp;gt; NU')) ;&lt;BR /&gt; &amp;gt; &lt;BR /&gt; &amp;gt; est30. is a format from format dataset.&lt;BR /&gt; &amp;gt; &lt;BR /&gt; &amp;gt; When I am trying as above I am getting error as &lt;BR /&gt; &amp;gt; Syntax error, expecting one of the following: &amp;lt;, &amp;lt;=,&lt;BR /&gt; &amp;gt; =, &amp;gt;, &amp;gt;=, EQ, GE, GT, LE,&lt;BR /&gt; &amp;gt; LT, NE, NG, NL, ^=, ~=.&lt;BR /&gt; &amp;gt; t to use NE . I should use 'not contains' . Is it&lt;BR /&gt; &amp;gt; possible with 'not contains'? Thanks .&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 18:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71037#M15354</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2017-08-31T18:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Not Contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71038#M15355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use NOT CONTAINS within SAS Miner. I often have to consider the data structure. If the data set is unstructured, like a paragraph of text, NOT CONTAINS often provides you a little more freedom compared to NE to parse the text. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 14:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Contains/m-p/71038#M15355</guid>
      <dc:creator>C_Ishihara</dc:creator>
      <dc:date>2015-04-02T14:47:54Z</dc:date>
    </item>
  </channel>
</rss>

