<?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: ERROR: A Character operand was found in the %Eval function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22596#M3666</link>
    <description>Hello Cbob,&lt;BR /&gt;
&lt;BR /&gt;
I personally do not like to use comparison operators for macro variables containing numbers with decimals. Macro variables contain character values so SAS compares character strings but not numbers. So result could depend on how many digits contain decimals you compare.&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
    <pubDate>Fri, 04 Mar 2011 20:48:02 GMT</pubDate>
    <dc:creator>SPR</dc:creator>
    <dc:date>2011-03-04T20:48:02Z</dc:date>
    <item>
      <title>ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22592#M3662</link>
      <description>Hello,&lt;BR /&gt;
Can anyone help me to solve this error?&lt;BR /&gt;
My Code:&lt;BR /&gt;
%let a = 0.967;&lt;BR /&gt;
%let b = 0.942;&lt;BR /&gt;
%let diff = %sysevalf(&amp;amp;a. - &amp;amp;b.);&lt;BR /&gt;
%Put diff = &amp;amp;diff.;&lt;BR /&gt;
&lt;BR /&gt;
%Macro test;&lt;BR /&gt;
&lt;BR /&gt;
%if (0.01 &amp;lt;= &amp;amp;diff. &amp;lt;= 0.01) %then %put &amp;amp;diff.;&lt;BR /&gt;
%else %put 'Out of Range';&lt;BR /&gt;
%Mend;&lt;BR /&gt;
%test;&lt;BR /&gt;
&lt;BR /&gt;
All I want to do is print the condition result in the log. In this case I&lt;BR /&gt;
want to print as Out of Range as the value of diff is beyond the boundary&lt;BR /&gt;
limits.&lt;BR /&gt;
&lt;BR /&gt;
I am getting this error "A character operand was found in the %EVAL function&lt;BR /&gt;
or %IF condition where a numeric operand is required. The condition was: (0.&lt;BR /&gt;
01 &amp;lt;= &amp;amp;diff. &amp;lt;= 0.01)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
cbob</description>
      <pubDate>Fri, 04 Mar 2011 14:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22592#M3662</guid>
      <dc:creator>cbob</dc:creator>
      <dc:date>2011-03-04T14:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22593#M3663</link>
      <description>Hello Cbob,&lt;BR /&gt;
&lt;BR /&gt;
Your test is not displayed correctly. Please, check.&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Fri, 04 Mar 2011 16:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22593#M3663</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-04T16:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22594#M3664</link>
      <description>&amp;gt; Hello Cbob,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Your test is not displayed correctly. Please, check.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Sincerely,&lt;BR /&gt;
&amp;gt; SPR&lt;BR /&gt;
&lt;BR /&gt;
Hello SPR,&lt;BR /&gt;
For some reason my msg didn't get fully displayed. Below is my actual code&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; %let a = 0.967;&lt;BR /&gt;
&amp;gt; %let b = 0.942;&lt;BR /&gt;
&amp;gt; %let diff = %sysevalf(&amp;amp;a. - &amp;amp;b.);&lt;BR /&gt;
&amp;gt; %Put diff = &amp;amp;diff.;&lt;BR /&gt;
&amp;gt; %Macro test;&lt;BR /&gt;
&amp;gt; %if (0.01 LE &amp;amp;diff. LE 0.01) %then %put &amp;amp;diff.;&lt;BR /&gt;
&amp;gt; %else %put 'Out of Range';&lt;BR /&gt;
&amp;gt; %Mend;&lt;BR /&gt;
&amp;gt; %test;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; All I want to do is print the condition result in the&lt;BR /&gt;
&amp;gt; log. In this case I&lt;BR /&gt;
&amp;gt; want to print as Out of Range as the value of diff is&lt;BR /&gt;
&amp;gt; beyond the boundary&lt;BR /&gt;
&amp;gt; limits.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am getting this error "A character operand was&lt;BR /&gt;
&amp;gt; found in the %EVAL function&lt;BR /&gt;
&amp;gt; or %IF condition where a numeric operand is required.&lt;BR /&gt;
&amp;gt; The condition was: (0. 01 LE &amp;amp;diff. LE 0.01)</description>
      <pubDate>Fri, 04 Mar 2011 18:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22594#M3664</guid>
      <dc:creator>cbob</dc:creator>
      <dc:date>2011-03-04T18:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22595#M3665</link>
      <description>Works fine:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
84&lt;BR /&gt;
85&lt;BR /&gt;
86     %let a = 0.967;&lt;BR /&gt;
87     %let b = 0.942;&lt;BR /&gt;
88     %let diff = %sysevalf(&amp;amp;a. - &amp;amp;b.);&lt;BR /&gt;
89     %Put diff = &amp;amp;diff.;&lt;BR /&gt;
diff = 0.025&lt;BR /&gt;
90     %Macro test;&lt;BR /&gt;
91     %if (0.01 LE &amp;amp;diff. LE 0.01) %then %put &amp;amp;diff.;&lt;BR /&gt;
92     %else %put 'Out of Range';&lt;BR /&gt;
93     %Mend;&lt;BR /&gt;
94     %test;&lt;BR /&gt;
'Out of Range'</description>
      <pubDate>Fri, 04 Mar 2011 18:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22595#M3665</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2011-03-04T18:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22596#M3666</link>
      <description>Hello Cbob,&lt;BR /&gt;
&lt;BR /&gt;
I personally do not like to use comparison operators for macro variables containing numbers with decimals. Macro variables contain character values so SAS compares character strings but not numbers. So result could depend on how many digits contain decimals you compare.&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Fri, 04 Mar 2011 20:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22596#M3666</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-04T20:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22597#M3667</link>
      <description>Your macro %test has a number of problems. I would rather do something like:&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;check&amp;nbsp;if&amp;nbsp;value&amp;nbsp;is&amp;nbsp;between&amp;nbsp;min&amp;nbsp;and&amp;nbsp;max,&amp;nbsp;inclusive&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;%macro&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;inRange(value,&amp;nbsp;min=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;0.0&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;,&amp;nbsp;max=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;0.1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;((&amp;amp;value)&amp;nbsp;&amp;lt;&amp;nbsp;(&amp;amp;min))&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;0&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%else&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%sysevalf&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;((&amp;amp;max)&amp;nbsp;&amp;lt;&amp;nbsp;(&amp;amp;value))&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;0&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%else&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;%mend&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;inRange;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;%inRange(0.00);&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;1&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;%inRange(0.01);&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;1&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;%inRange(0.10);&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;1&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;%inRange(0.15);&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;0&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Mar 2011 21:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22597#M3667</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-03-04T21:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22598#M3668</link>
      <description>Chang,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your response. I guess what I'm  trying to do is to validate whether the difference between the  two macro variables a&amp;amp; b is  with in  the boundary limits(-0.01 to 0.01) or not.  &lt;BR /&gt;
&lt;BR /&gt;
%let a = 0.9377;&lt;BR /&gt;
%let b = 0.9570;&lt;BR /&gt;
%let diff = %sysevalf(&amp;amp;a - &amp;amp;b);&lt;BR /&gt;
%Put diff = &amp;amp;diff;&lt;BR /&gt;
&lt;BR /&gt;
%Macro test;&lt;BR /&gt;
%if ((-0.01) LE %sysevalf(&amp;amp;diff.) LE (0.01)) %then %put &amp;amp;diff.;&lt;BR /&gt;
%else %put 'Out of Range';&lt;BR /&gt;
%Mend;&lt;BR /&gt;
%test;&lt;BR /&gt;
&lt;BR /&gt;
When i run the above code I am getting the below error&lt;BR /&gt;
 ERROR: A Character operand was found in the %Eval function or %IF condition where a numeric operand is required.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sridhar</description>
      <pubDate>Fri, 04 Mar 2011 23:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22598#M3668</guid>
      <dc:creator>cbob</dc:creator>
      <dc:date>2011-03-04T23:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22599#M3669</link>
      <description>&amp;gt; Works fine:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; 84&lt;BR /&gt;
&amp;gt; 85&lt;BR /&gt;
&amp;gt; 86     %let a = 0.967;&lt;BR /&gt;
&amp;gt; 87     %let b = 0.942;&lt;BR /&gt;
&amp;gt; 88     %let diff = %sysevalf(&amp;amp;a. - &amp;amp;b.);&lt;BR /&gt;
&amp;gt; 89     %Put diff = &amp;amp;diff.;&lt;BR /&gt;
&amp;gt; diff = 0.025&lt;BR /&gt;
&amp;gt; 90     %Macro test;&lt;BR /&gt;
&amp;gt; 91     %if (0.01 LE &amp;amp;diff. LE 0.01) %then %put&lt;BR /&gt;
&amp;gt; &amp;amp;diff.;&lt;BR /&gt;
&amp;gt; 92     %else %put 'Out of Range';&lt;BR /&gt;
&amp;gt; 93     %Mend;&lt;BR /&gt;
&amp;gt; 94     %test;&lt;BR /&gt;
&amp;gt; 'Out of Range'&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your reply!. It blows up when the diff is negative.Also it is -0.01 in the below lower limit. It works absolutely fine with diff value being positive but if the diff  is NEGATIVE it throws error.&lt;BR /&gt;
&lt;BR /&gt;
%if (-0.01 LE &amp;amp;diff. LE 0.01) %then %put&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;B&gt;&lt;/B&gt;</description>
      <pubDate>Fri, 04 Mar 2011 23:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22599#M3669</guid>
      <dc:creator>cbob</dc:creator>
      <dc:date>2011-03-04T23:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22600#M3670</link>
      <description>@cbob: Someone has once said:&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Programming is hard enough even when you do know the language. If you don't, I don't see how you have a chance."&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
After reading Beilei Xu and Lei Zhang's excellent &lt;A href="http://www.nesug.org/proceedings/nesug04/pm/pm26.pdf"&gt;NESUG paper&lt;/A&gt;, I think I know what is going on -- that is, the very first part of the comparison:&lt;BR /&gt; &lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;-0.01 le 0.01&lt;/SPAN&gt;&lt;BR /&gt; is an error within the implicit %eval between %if and %then. See below for more.&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(-1);&amp;nbsp;&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;this&amp;nbsp;is&amp;nbsp;fine.&amp;nbsp;integer&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(0.01);&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;error.&amp;nbsp;char(.)&amp;nbsp;found&amp;nbsp;when&amp;nbsp;an&amp;nbsp;integer&amp;nbsp;expected&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(0.01&amp;nbsp;le&amp;nbsp;0.01);&amp;nbsp;&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;fine.&amp;nbsp;just&amp;nbsp;comparing&amp;nbsp;two&amp;nbsp;text&amp;nbsp;strings&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;(-0.01&amp;nbsp;le&amp;nbsp;0.01);&amp;nbsp;%&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;*--&amp;nbsp;error.&amp;nbsp;minus&amp;nbsp;operator&amp;nbsp;expects&amp;nbsp;an&amp;nbsp;integer&amp;nbsp;--*;&lt;/SPAN&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 05 Mar 2011 04:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22600#M3670</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-03-05T04:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22601#M3671</link>
      <description>Hi.&lt;BR /&gt;
Try to this:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
%if %sysevalf((-0.01) LE &amp;amp;diff. LE (0.01)) %then &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For the %if ,macro facility will automatically add %eval around the digit ,&lt;BR /&gt;
So you need to change it into %sysevalf.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Mon, 07 Mar 2011 01:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22601#M3671</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-07T01:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22602#M3672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This actually is helping me with the same kind of issue. Saved me tons of research time! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 21:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22602#M3672</guid>
      <dc:creator>CPAZ</dc:creator>
      <dc:date>2012-04-06T21:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22603#M3673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aside from the problem of evaluating non integers with the implied %EVAL.&amp;nbsp; The macro language does not evaluate compound expressions in the same way as in the DATA step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the DATA step&lt;/P&gt;&lt;P&gt;if 5 &amp;lt; x &amp;lt; 10 is evaluaged as if 5 &amp;lt; x and x &amp;lt; 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the macro language&lt;/P&gt;&lt;P&gt;%if 5 &amp;lt; &amp;amp;x &amp;lt; 10 is evaluated as %if (5 &amp;lt; &amp;amp;x) &amp;lt; 10&lt;/P&gt;&lt;P&gt;Regardless of the value of &amp;amp;X this expression is true as both 0 and 1 are less than 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the macro language always break up compound expressions.&lt;/P&gt;&lt;P&gt;%if 5 &amp;lt; &amp;amp;x and &amp;amp;x &amp;lt; 10 %then .... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 21:58:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22603#M3673</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-04-06T21:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22604#M3674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArtC,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Love your book on SAS Macro. Wondering how I can get your signature.:smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 03:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22604#M3674</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-07T03:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22605#M3675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is always fun to meet those that read and use the SAS Press books.&amp;nbsp; If you are at SAS Global Forum or PharmaSUG this spring look me up.&amp;nbsp; I would be very happy to meet and talk with you and to of course sign your book.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 21:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22605#M3675</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-04-07T21:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22606#M3676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haikuo:&amp;nbsp; While I haven't written any books that I can sign, look me up, too, if you are going to SGF.&amp;nbsp; I'm doing one presentation with FriedEgg, another with both FriedEgg and KSharp (and a couple of other presentations too) and, of course, ArtC and I will both be presenting at the SAS-L/ SAS Discussion Forums/ sasCommunity.org/ SASProfessionals.net/ SASCanadaCommunity meetup on Tuesday night (April 24th) between 6pm and 8pm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2012 22:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22606#M3676</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-04-07T22:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A Character operand was found in the %Eval function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22607#M3677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish I could go to Orlando this time. I really I hope I can go next time. and if I could ever make it, you guys can't escape from me.:smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2012 02:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-Character-operand-was-found-in-the-Eval-function/m-p/22607#M3677</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-08T02:09:01Z</dc:date>
    </item>
  </channel>
</rss>

