<?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: Macro resolution and %IF-%Then %Else statements in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198551#M37185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;ey &lt;/SPAN&gt;&lt;STRONG style="line-height: 1.5em; font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="889976" data-username="Punxsutawney" href="https://communities.sas.com/people/Punxsutawney" id="jive-88997654927538181458186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;Punxsutawney&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;I think you can still close your &lt;/SPAN&gt;question&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; as &lt;/SPAN&gt;answered&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;, so it doesn't draw attention for others that might want to try and &lt;/SPAN&gt;answer&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; the question. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasilij&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2015 10:21:32 GMT</pubDate>
    <dc:creator>VasilijNevlev</dc:creator>
    <dc:date>2015-08-14T10:21:32Z</dc:date>
    <item>
      <title>Macro resolution and %IF-%Then %Else statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198549#M37183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable MBR_PED_IND resolves to N&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;mbr_ped_ind eq Y is FALSE&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable GDIST resolves to 319.6732&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable DIST_LIMIT1 resolves to 10&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;gdist le &amp;amp;dist_limit1 is FALSE&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable GDIST resolves to 319.6732&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable DIST_LIMIT2 resolves to 20&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;gdist le &amp;amp;dist_limit2 is FALSE&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable GDIST resolves to 319.6732&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable DIST_LIMIT3 resolves to 30&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;gdist le &amp;amp;dist_limit3 is FALSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable MBR_PED_IND resolves to Y&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;mbr_ped_ind eq Y is TRUE&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable GDIST resolves to&amp;nbsp; 171.732&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable DIST_LIMIT1 resolves to 10&lt;/P&gt;&lt;P&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;gdist le &amp;amp;dist_limit1 is FALSE&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;SYMBOLGEN:&amp;nbsp; Macro variable GDIST resolves to&amp;nbsp; 171.732&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;SYMBOLGEN:&amp;nbsp; Macro variable DIST_LIMIT2 resolves to 20&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;MLOGIC(RUNNER):&amp;nbsp; %IF condition &amp;amp;gdist le &amp;amp;dist_limit2 is TRUE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first block worked fined. However, in the second block especially in the colored portion, the condition evaluates to TRUE instead of FALSE. Clearly 171.20 is NOT less than 20. Can someone help with what's going on here? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 17:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198549#M37183</guid>
      <dc:creator>Punxsutawney</dc:creator>
      <dc:date>2015-08-13T17:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolution and %IF-%Then %Else statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198550#M37184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out myself. I only needed to put the condition inside the function %sysevalf. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 18:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198550#M37184</guid>
      <dc:creator>Punxsutawney</dc:creator>
      <dc:date>2015-08-13T18:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolution and %IF-%Then %Else statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198551#M37185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;ey &lt;/SPAN&gt;&lt;STRONG style="line-height: 1.5em; font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="889976" data-username="Punxsutawney" href="https://communities.sas.com/people/Punxsutawney" id="jive-88997654927538181458186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;Punxsutawney&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;I think you can still close your &lt;/SPAN&gt;question&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; as &lt;/SPAN&gt;answered&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;, so it doesn't draw attention for others that might want to try and &lt;/SPAN&gt;answer&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; the question. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasilij&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 10:21:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198551#M37185</guid>
      <dc:creator>VasilijNevlev</dc:creator>
      <dc:date>2015-08-14T10:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolution and %IF-%Then %Else statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198552#M37186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you figured out a solution.&amp;nbsp; It happened because macro variables are always character and '20' is greater than '171'.&amp;nbsp;&amp;nbsp; %sysevalf (and %syseval) tells the macro processor to handle them as numeric values.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(Just thought this explanation might be useful to others.)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 14:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198552#M37186</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2015-08-14T14:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolution and %IF-%Then %Else statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198553#M37187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 15:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolution-and-IF-Then-Else-statements/m-p/198553#M37187</guid>
      <dc:creator>Punxsutawney</dc:creator>
      <dc:date>2015-08-14T15:49:42Z</dc:date>
    </item>
  </channel>
</rss>

