<?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: Checking for the sting in IF condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596445#M171729</link>
    <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;pointed out in &lt;A href="https://communities.sas.com/t5/SAS-Programming/Error-using-WHERE-clause/m-p/596240" target="_self"&gt;this thread&lt;/A&gt;, you should make sure to use the proper quotation marks and not the Windows Smart Quotes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
SCENARIO_ID="BASECASE";
run;

data want;
    set have;
    *if SCENARIO_ID ne “BASECASE” then output;
    if SCENARIO_ID ne "BASECASE" then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 15 Oct 2019 07:51:37 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-10-15T07:51:37Z</dc:date>
    <item>
      <title>Checking for the sting in IF condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596443#M171728</link>
      <description>&lt;P&gt;Could you please help me to overcome the below NOTE in the log? Objective is to check for the string "&lt;CODE class=" language-sas"&gt;BASECASE&lt;/CODE&gt;" in the variable &lt;CODE class=" language-sas"&gt;SCENARIO_ID&lt;/CODE&gt;&amp;nbsp;. If it not matches, then Output that record in the output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;44         	FLT_ID=7;
45         	if SCENARIO_ID ne “BASECASE” then
46         		output;
47         run;

NOTE: Variable '“BASECASE”'n is uninitialized&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596443#M171728</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2019-10-15T07:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for the sting in IF condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596445#M171729</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;pointed out in &lt;A href="https://communities.sas.com/t5/SAS-Programming/Error-using-WHERE-clause/m-p/596240" target="_self"&gt;this thread&lt;/A&gt;, you should make sure to use the proper quotation marks and not the Windows Smart Quotes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
SCENARIO_ID="BASECASE";
run;

data want;
    set have;
    *if SCENARIO_ID ne “BASECASE” then output;
    if SCENARIO_ID ne "BASECASE" then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596445#M171729</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-15T07:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for the sting in IF condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596446#M171730</link>
      <description>&lt;P&gt;You committed the mistake of routing code through a word processor (somewhere in your development process) that replaced the correct double quotes with invalid "curly" ones.&lt;/P&gt;
&lt;P&gt;This should work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FLT_ID=7;
	if SCENARIO_ID ne "BASECASE" then
		output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596446#M171730</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-15T07:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for the sting in IF condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596447#M171731</link>
      <description>&lt;P&gt;If you share full code will be helpful but some time if your dataset is not having set statement then your original dataset is destroyed and start over.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-the-sting-in-IF-condition/m-p/596447#M171731</guid>
      <dc:creator>AkilanR</dc:creator>
      <dc:date>2019-10-15T07:59:54Z</dc:date>
    </item>
  </channel>
</rss>

