<?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 or %IF condition where.. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/349215#M80980</link>
    <description>&lt;P&gt;First of all, your macrovariables created during the execution of&amp;nbsp;&lt;SPAN&gt;%InitializeVariables will cease to exist being local in scope, i.e they are local macro variables that exists only during the execution of macro&amp;nbsp;%Initialize. Add a %global statement before %let and make it global like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%macro InitializeVariables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;%global&amp;nbsp;_EFIERR_ &amp;nbsp;_count_ ;&lt;/STRONG&gt;&lt;BR /&gt;%let _EFIERR_ = 0; /* initialize the ERROR detection macro variable */&lt;BR /&gt;%let _count_ = 0; /* initialize record count macro variable */&lt;BR /&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2017 18:15:45 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2017-04-11T18:15:45Z</dc:date>
    <item>
      <title>ERROR: A character operand was found in the %EVAL function or %IF condition where..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/349209#M80979</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro InitializeVariables;&lt;BR /&gt;%let _EFIERR_ = 0; /* initialize the ERROR detection macro variable */&lt;BR /&gt;%let _count_ = 0; /* initialize record count macro variable */&lt;BR /&gt;%mend;&lt;BR /&gt;&lt;BR /&gt;%macro CheckForErrors;&lt;BR /&gt;/*if there is error , then _EFIERR_=1, else _EFIERR_=0 */&lt;BR /&gt;%if &amp;amp;_EFIERR_=0 %then %PUT NOTE: &amp;amp;=_EFIERR_ - no read errors detected with &amp;amp;_count_ records read.;&lt;BR /&gt;%else %PUT WARNING: &amp;amp;=_EFIERR_ - some read errors were detected while reading &amp;amp;_count_ records.;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%InitializeVariables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*rest of my code*&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;count+1;&lt;BR /&gt;if _ERROR_ then call symputx('_EFIERR_',1); /*set ERROR detection macro*/&lt;BR /&gt;if last then call symputx ('_count_',count);run;&lt;BR /&gt;%CheckForErrors&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following warning &amp;amp; error messages:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference _EFIERR_ not resolved.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a&lt;BR /&gt;numeric operand is required. The condition was: &amp;amp;_EFIERR_=0&lt;BR /&gt;ERROR: The macro CHECKFORERRORS will stop executing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to fix this? What am I missing here? Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 17:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/349209#M80979</guid>
      <dc:creator>Kiko</dc:creator>
      <dc:date>2017-04-11T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/349215#M80980</link>
      <description>&lt;P&gt;First of all, your macrovariables created during the execution of&amp;nbsp;&lt;SPAN&gt;%InitializeVariables will cease to exist being local in scope, i.e they are local macro variables that exists only during the execution of macro&amp;nbsp;%Initialize. Add a %global statement before %let and make it global like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%macro InitializeVariables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;%global&amp;nbsp;_EFIERR_ &amp;nbsp;_count_ ;&lt;/STRONG&gt;&lt;BR /&gt;%let _EFIERR_ = 0; /* initialize the ERROR detection macro variable */&lt;BR /&gt;%let _count_ = 0; /* initialize record count macro variable */&lt;BR /&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 18:15:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/349215#M80980</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-04-11T18:15:45Z</dc:date>
    </item>
  </channel>
</rss>

