<?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: Kindly help to resolve this code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491308#M128823</link>
    <description>&lt;P&gt;Macro language does not require quotes to identify character strings.&amp;nbsp; Because you added them, %TRIM is doing nothing.&amp;nbsp; Best to get rid of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you join three conditions using OR, one (or more) of the comparisons must be true.&amp;nbsp; The comparisons should use AND instead of OR:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%if %upcase(&amp;amp;Include_Exclude) NE INCLUDE &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AND %upcase(&amp;amp;Include_Exclude) NE EXCLUDE &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AND %upcase(&amp;amp;Include_Exclude) NE ALL DATASETS %then %do;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you are truly concerned about the value of &amp;amp;INCLUDE_EXCLUDE containing special characters or special words, switch from %UPCASE to %QUPCASE.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 15:51:00 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-08-30T15:51:00Z</dc:date>
    <item>
      <title>Kindly help to resolve this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491302#M128818</link>
      <description>&lt;P&gt;%if (%upcase(%trim("&amp;amp;Include_Exclude")) NE "INCLUDE") OR (%upcase(%trim("&amp;amp;Include_Exclude")) NE "EXCLUDE") OR (%upcase(%trim("&amp;amp;Include_Exclude")) NE "ALL DATASETS") %then %do;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%message(Fatel Error:Values in Include/Exclude Dataset is not correct^20);&lt;/P&gt;&lt;P&gt;%goto exit;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value of&amp;nbsp;&lt;SPAN&gt;Include_Exclude macro variable is "Include". I want if value is not equal to INCLUDE then exit macro. but it is not getting resolved and not giving correct result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried&amp;nbsp;following-:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.Removing quotes from the macro variable and the value. for example --&amp;gt;&amp;nbsp;(%upcase(%trim(&amp;amp;Include_Exclude)) NE&amp;nbsp; INCLUDE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I have tried&amp;nbsp;removing trim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But still not able to get the desired result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly help me to solve the same.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491302#M128818</guid>
      <dc:creator>ankitk321</dc:creator>
      <dc:date>2018-08-30T15:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Kindly help to resolve this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491308#M128823</link>
      <description>&lt;P&gt;Macro language does not require quotes to identify character strings.&amp;nbsp; Because you added them, %TRIM is doing nothing.&amp;nbsp; Best to get rid of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you join three conditions using OR, one (or more) of the comparisons must be true.&amp;nbsp; The comparisons should use AND instead of OR:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%if %upcase(&amp;amp;Include_Exclude) NE INCLUDE &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AND %upcase(&amp;amp;Include_Exclude) NE EXCLUDE &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AND %upcase(&amp;amp;Include_Exclude) NE ALL DATASETS %then %do;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you are truly concerned about the value of &amp;amp;INCLUDE_EXCLUDE containing special characters or special words, switch from %UPCASE to %QUPCASE.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491308#M128823</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-30T15:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Kindly help to resolve this code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491318#M128830</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are seeing a message in the log such as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;WARNING: Apparent symbolic INCLUDE_EXCLUDE&amp;nbsp;reference not resolved.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you might have a global vs local scope issue. If this is the case then try using the statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;%global include_exclude;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before the variable is first used so that it can be accessed elsewhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is not the case then please share more of the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might want to also consider changing the &lt;FONT face="courier new,courier"&gt;or&lt;/FONT&gt; conditions to &lt;FONT face="courier new,courier"&gt;and&lt;/FONT&gt; conditions as your test ends up being:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; "INCLUDE" ne "INCLUDE"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;or "INCLUDE" ne "EXCLUDE"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;or "INCLUDE" ne "ALL DATASETS"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which evaluates to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; FALSE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;or TRUE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;or TRUE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which gives &lt;FONT face="courier new,courier"&gt;TRUE&lt;/FONT&gt;. Using &lt;FONT face="courier new,courier"&gt;and&lt;/FONT&gt; instead of &lt;FONT face="courier new,courier"&gt;or&lt;/FONT&gt; would give &lt;FONT face="courier new,courier"&gt;FALSE&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 16:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kindly-help-to-resolve-this-code/m-p/491318#M128830</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2018-08-30T16:00:33Z</dc:date>
    </item>
  </channel>
</rss>

