<?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 a numeric oper 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/414334#M101511</link>
    <description>&lt;P&gt;Post examples, show test data in the form of a datastep, and what you want to achieve.&amp;nbsp; Its hard to keep guessing what you mean.&amp;nbsp; You can create code from one datastep in numerous ways:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set have;
  if val=1 then call execute('data want;  file "abc.txt";...;run;');
run;&lt;/PRE&gt;
&lt;P&gt;For example.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 11:04:08 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-11-17T11:04:08Z</dc:date>
    <item>
      <title>ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414313#M101503</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting below error when executing below stmnt in a macro . Val is numeric and runstatus is character .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%if (val=0) AND (Runstatus = 'F' or RUNSTATUS='' ) %then&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:&lt;BR /&gt;val=1 and runstatus = "F" or ""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly advise.Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 10:29: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/414313#M101503</guid>
      <dc:creator>Sandy10</dc:creator>
      <dc:date>2017-11-17T10:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414319#M101504</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;text&lt;/STRONG&gt;&lt;/EM&gt;(!)&amp;nbsp;val is never numeric; either you missed using the ampersand for macro variable &amp;amp;val, or you tried to access a data step variable, which is impossible from the macro preprocessor.&lt;/P&gt;
&lt;P&gt;To clarify, post your complete code.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 10:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414319#M101504</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-17T10:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414321#M101505</link>
      <description>&lt;P&gt;%if construct is a macro function.&amp;nbsp; You cannot use datastep variables in the construct - macro is resolved&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;before&lt;/STRONG&gt;&lt;/U&gt; datastep compilation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post your code on what you are trying to do - we can't tell from tiny snippets.&amp;nbsp; First question would be why you are using a macro if construct to try to check datastep variables which will not work.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 10:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414321#M101505</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-17T10:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414322#M101506</link>
      <description>Hi. Yes am tryinh to access a datastep variable.&lt;BR /&gt;&lt;BR /&gt;Data _null_&lt;BR /&gt;Set work.abc&lt;BR /&gt;if (val=0) AND (Runstatus = 'F' or RUNSTATUS='' ) %then&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Both val and runstatus in abc table. Am doin in a loop inside a macro. Please advise how to reference both these varible in a macro. Thanks</description>
      <pubDate>Fri, 17 Nov 2017 10:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414322#M101506</guid>
      <dc:creator>Sandy10</dc:creator>
      <dc:date>2017-11-17T10:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414323#M101507</link>
      <description>&lt;P&gt;You&amp;nbsp;&lt;STRONG&gt;CANNOT&lt;/STRONG&gt; access data step variables from macro code, period. Use data step code instead.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 10:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414323#M101507</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-17T10:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414327#M101508</link>
      <description>Hi. Thanks. I wil try normal if else inside a data step . Is it possible to create a data step inside a datastel and uae filename statement?</description>
      <pubDate>Fri, 17 Nov 2017 10:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414327#M101508</guid>
      <dc:creator>Sandy10</dc:creator>
      <dc:date>2017-11-17T10:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414333#M101510</link>
      <description>&lt;P&gt;There can only be one datastep active at any given time. Please describe what you want to accomplish, post example data (in a data step to easily recreate your data), and what your expected result should look like.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 11:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414333#M101510</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-17T11:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414334#M101511</link>
      <description>&lt;P&gt;Post examples, show test data in the form of a datastep, and what you want to achieve.&amp;nbsp; Its hard to keep guessing what you mean.&amp;nbsp; You can create code from one datastep in numerous ways:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set have;
  if val=1 then call execute('data want;  file "abc.txt";...;run;');
run;&lt;/PRE&gt;
&lt;P&gt;For example.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 11:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414334#M101511</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-17T11:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric oper</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414335#M101512</link>
      <description>Hi. I want to try similar to wat you have posted. I will try and update here. Thanks for your reply.</description>
      <pubDate>Fri, 17 Nov 2017 11:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-character-operand-was-found-in-the-EVAL-function-or-IF/m-p/414335#M101512</guid>
      <dc:creator>Sandy10</dc:creator>
      <dc:date>2017-11-17T11:06:49Z</dc:date>
    </item>
  </channel>
</rss>

