<?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 Macro error message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450213#M113360</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I made some codes including macro. They went well when I used last week, but I always found errors when using them this week&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro try(missper,n_boot);
%MACRO mi(missper);

data rmse&amp;amp;missper;
		set rmse&amp;amp;missper;
		index = &amp;amp;i;
		
	run;
	%if &amp;amp;i=1 %then %do;
	data poolrmseem&amp;amp;missper rmse_old rmse&amp;amp;missper;
		set rmse&amp;amp;missper;
		index = &amp;amp;i;
		run;
	%end;
	%else %if &amp;amp;i&amp;gt;1 %then %do;
	data poolrmseem&amp;amp;missper;set rmse_old rmse&amp;amp;missper;run;
	data rmse_old;set poolrmseem&amp;amp;missper;run;
	%end;
%mend mi;
%mi(&amp;amp;missper);

   %let i=1;
   %do %until (&amp;amp;i&amp;gt;&amp;amp;n_boot);
	  %mi(&amp;amp;missper);
	  %let i = %eval(&amp;amp;i+1);
   %end;
%mend try;
%try (20, 5);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;. Pretty weird!&lt;/P&gt;&lt;P&gt;I have listed the code and log message below. Could anybody help me to find out the reason? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;22: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN&lt;BR /&gt;where the error has occurred.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant,&lt;BR /&gt;a datetime constant, a missing value, INPUT, PUT.&lt;BR /&gt;WARNING: Apparent symbolic reference I not resolved.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.RMSE20 may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 5 variables.&lt;BR /&gt;WARNING: Data set WORK.RMSE20 was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;WARNING: Apparent symbolic reference I not resolved.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is&lt;BR /&gt;required. The condition was: &amp;amp;i=1&lt;BR /&gt;ERROR: The macro MI will stop executing.&lt;/P&gt;</description>
    <pubDate>Sun, 01 Apr 2018 03:20:55 GMT</pubDate>
    <dc:creator>xiangpang</dc:creator>
    <dc:date>2018-04-01T03:20:55Z</dc:date>
    <item>
      <title>Macro error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450213#M113360</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I made some codes including macro. They went well when I used last week, but I always found errors when using them this week&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro try(missper,n_boot);
%MACRO mi(missper);

data rmse&amp;amp;missper;
		set rmse&amp;amp;missper;
		index = &amp;amp;i;
		
	run;
	%if &amp;amp;i=1 %then %do;
	data poolrmseem&amp;amp;missper rmse_old rmse&amp;amp;missper;
		set rmse&amp;amp;missper;
		index = &amp;amp;i;
		run;
	%end;
	%else %if &amp;amp;i&amp;gt;1 %then %do;
	data poolrmseem&amp;amp;missper;set rmse_old rmse&amp;amp;missper;run;
	data rmse_old;set poolrmseem&amp;amp;missper;run;
	%end;
%mend mi;
%mi(&amp;amp;missper);

   %let i=1;
   %do %until (&amp;amp;i&amp;gt;&amp;amp;n_boot);
	  %mi(&amp;amp;missper);
	  %let i = %eval(&amp;amp;i+1);
   %end;
%mend try;
%try (20, 5);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;. Pretty weird!&lt;/P&gt;&lt;P&gt;I have listed the code and log message below. Could anybody help me to find out the reason? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;22: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN&lt;BR /&gt;where the error has occurred.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant,&lt;BR /&gt;a datetime constant, a missing value, INPUT, PUT.&lt;BR /&gt;WARNING: Apparent symbolic reference I not resolved.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.RMSE20 may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 5 variables.&lt;BR /&gt;WARNING: Data set WORK.RMSE20 was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;WARNING: Apparent symbolic reference I not resolved.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is&lt;BR /&gt;required. The condition was: &amp;amp;i=1&lt;BR /&gt;ERROR: The macro MI will stop executing.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 03:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450213#M113360</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-01T03:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450217#M113362</link>
      <description>&lt;P&gt;Not weird!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you have&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%mi&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;missper&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in your code before you begin the loop. SAS doesn't hasn't, at that point, created macro variable &amp;amp;i&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you remove that line the code does whatever it is doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 03:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450217#M113362</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-01T03:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450219#M113363</link>
      <description>&lt;P&gt;Thanks, I remove it and the error gone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 03:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-error-message/m-p/450219#M113363</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-01T03:57:51Z</dc:date>
    </item>
  </channel>
</rss>

