<?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 errors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452267#M114118</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data eq;
input ID y x z w;
cards;
1 1 65 40 0
2 1 34 . 0
3 0 . 23 0
4 1 48 35 0 
;
run;
%macro em (missper, n_imp, my_seed);
proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i simple nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper ;
    em itprint ;  
    var y x z w;
	run;
%mend em;

%macro mi (missper,n_imp,n_seed);
	%em (&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
%mend mi;

%macro large(missper,n_imp,n_seed,n_boot);
 data seed_long(drop=i);
    call streaminit(&amp;amp;n_seed);
    do i = 1 to &amp;amp;n_boot;
      x_seed = floor(rand("Uniform")*500000); output;
    end;
 run;  

data _null_;
   set seed_long;
   call symput('my_seed'|| compress(put(_n_,4.)), x_seed);
  run;

   %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 large;

%large(20, 5, 3456,3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to do is using a random fixed seed to create EM output. but I got the following error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE 137-205: Line generated by the invoked macro "EM".&lt;BR /&gt;1 proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i simple nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper ; em&lt;BR /&gt;---&lt;BR /&gt;22&lt;BR /&gt;1 ! itprint ; var y x z w; run;&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: an integer constant, PCTMISSING.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know %large has no problem. The problem is the writing of EM and MI macro variable. But I don't know what is the right way to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sun, 08 Apr 2018 01:08:12 GMT</pubDate>
    <dc:creator>xiangpang</dc:creator>
    <dc:date>2018-04-08T01:08:12Z</dc:date>
    <item>
      <title>macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452267#M114118</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data eq;
input ID y x z w;
cards;
1 1 65 40 0
2 1 34 . 0
3 0 . 23 0
4 1 48 35 0 
;
run;
%macro em (missper, n_imp, my_seed);
proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i simple nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper ;
    em itprint ;  
    var y x z w;
	run;
%mend em;

%macro mi (missper,n_imp,n_seed);
	%em (&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
%mend mi;

%macro large(missper,n_imp,n_seed,n_boot);
 data seed_long(drop=i);
    call streaminit(&amp;amp;n_seed);
    do i = 1 to &amp;amp;n_boot;
      x_seed = floor(rand("Uniform")*500000); output;
    end;
 run;  

data _null_;
   set seed_long;
   call symput('my_seed'|| compress(put(_n_,4.)), x_seed);
  run;

   %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 large;

%large(20, 5, 3456,3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to do is using a random fixed seed to create EM output. but I got the following error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE 137-205: Line generated by the invoked macro "EM".&lt;BR /&gt;1 proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i simple nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper ; em&lt;BR /&gt;---&lt;BR /&gt;22&lt;BR /&gt;1 ! itprint ; var y x z w; run;&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: an integer constant, PCTMISSING.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know %large has no problem. The problem is the writing of EM and MI macro variable. But I don't know what is the right way to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 01:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452267#M114118</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T01:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452268#M114119</link>
      <description>&lt;P&gt;Place a %put statement before the PROC MI statement, so you can check the values of the macro variables at that instant.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 01:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452268#M114119</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-08T01:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452271#M114122</link>
      <description>&lt;P&gt;nimpute is not created. but how to fix it? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc mi data=eq seed= 95419 simple nimpute= out=EMIMP20&lt;BR /&gt;NOTE: Line generated by the invoked macro "EM".&lt;BR /&gt;1 em itprint ;&lt;BR /&gt;--&lt;BR /&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 01:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452271#M114122</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T01:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452273#M114123</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;nimpute is not created. but how to fix it? Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc mi data=eq seed= 95419 simple nimpute= out=EMIMP20&lt;BR /&gt;NOTE: Line generated by the invoked macro "EM".&lt;BR /&gt;1 em itprint ;&lt;BR /&gt;--&lt;BR /&gt;180&lt;/P&gt;
&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;One thing to note which &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;hinted: Your macro %MI() expects three parameters to be passed in but you're only passing in one when calling it.&lt;/P&gt;
&lt;PRE&gt;    %mi(&amp;amp;missper)&lt;/PRE&gt;
&lt;P&gt;That means your other macro vars will be blank leading to invalid generated statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use option MPRINT to see what SAS code the macros actually generate.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 02:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452273#M114123</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-08T02:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452274#M114124</link>
      <description>&lt;P&gt;I restart SAS and found nimpute problem gone. but still have errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data=eq seed= 436565 nimpute=5 out=EMIMP20&lt;BR /&gt;NOTE: Line generated by the invoked macro "EM".&lt;BR /&gt;1 em itprint;&lt;BR /&gt;--&lt;BR /&gt;180&lt;BR /&gt;MPRINT(EM): em itprint;&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "EM".&lt;BR /&gt;1 var y x z w;&lt;BR /&gt;---&lt;BR /&gt;180&lt;BR /&gt;MPRINT(EM): var y x z w;&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;MPRINT(EM): run;&lt;BR /&gt;MPRINT(MI): ;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 02:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452274#M114124</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T02:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452278#M114125</link>
      <description>&lt;P&gt;You have written macro's that take three parameters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro mi (missper,n_imp,n_seed);
	%em (&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
%mend mi;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You are calling it with only one parameter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	  %mi(&amp;amp;missper)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So that means that it is calling EM like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%em (&amp;amp;missper,,);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which means this line the %EM macro&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i simple nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So if the macro variable I resolves to 1 then you are generating this code&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=eq seed=&amp;amp;1 simple nimpute= out=EMIMP&amp;amp;missper ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now &amp;amp;1 is not a valid macro variable reference so it will stay as &amp;amp;1 is is clearly not a number that can be used for a seed.&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;for the NIMPUTE= option you are not giving any value at all.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 03:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452278#M114125</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-08T03:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452279#M114126</link>
      <description>&lt;P&gt;Thanks. I update the code.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data eq;
input ID y x z w;
cards;
1 1 65 40 0
2 1 34 . 0
3 0 . 23 0
4 1 48 35 0 
;
run;

%macro tem (missper,n_imp,n_seed);
%PUT proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper.;
	EM itprint outem = outem;  
    var y x z w;
	run;
%mend tem;


 %macro mi (missper,n_imp,n_seed);
	%tem (&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
%mend mi;

%macro large(missper,n_imp,n_seed,n_boot);
 data seed_long(drop=i);
    call streaminit(&amp;amp;n_seed);
    do i = 1 to &amp;amp;n_boot;
      x_seed = floor(rand("Uniform")*500000); output;
    end;
 run;  

data _null_;
   set seed_long;
   call symput('my_seed'|| compress(put(_n_,4.)), x_seed);
  run;

   %let i=1;
   %do %until (&amp;amp;i&amp;gt;&amp;amp;n_boot) ;
	  %mi(&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
      %let i = %eval(&amp;amp;i+1);
   %end;
%mend large;

%large(20,5,3456,3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I changed %mi with three parameters. As you can see. the EM is like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data=eq seed= 95419 nimpute=5 out=EMIMP20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the parameter is right now. but it still has other error like this:&amp;nbsp;&lt;BR /&gt;NOTE: Line generated by the invoked macro "TEM".&lt;BR /&gt;1 EM itprint outem = outem;&lt;BR /&gt;--&lt;BR /&gt;180&lt;BR /&gt;MPRINT(TEM): EM itprint outem = outem;&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "TEM".&lt;BR /&gt;1 var y x z w;&lt;BR /&gt;---&lt;BR /&gt;180&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 03:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452279#M114126</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T03:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452280#M114127</link>
      <description>&lt;P&gt;Where is the "1" coming from? It is really hard to figure out error messages without the full log. Also please use the pop-up windows that open when you click on the Insert Code icon on the menu bar instead of pasting into the regular window. This will prevent the forum editor from reflowing the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure that your file does not contain some strange character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you running SAS? Are using SAS Display Manger? Or SAS/Studio or SAS Enterprise guide or some other "workspace" method of running SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 03:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452280#M114127</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-08T03:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452281#M114128</link>
      <description>&lt;P&gt;apart from wonderful suggestions, Please try executing your code without macro variables and macro. if it works then you can easily map to macro and make it dynamic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 03:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452281#M114128</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-04-08T03:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452282#M114129</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1605  data eq;
1606  input ID y x z w;
1607  cards;

NOTE: The data set WORK.EQ has 4 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


1612  ;
1613  run;
1614
1615  %macro tem (missper,n_imp,n_seed);
1616  %PUT proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper;
1617      em itprint outem = outem;
1618      var y x z w;
1619      run;
1620  %mend tem;
1621
1622   %macro mi (missper,n_imp,n_seed);
1623      %tem (&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
1624  %mend mi;
1625
1626  %macro large(missper,n_imp,n_seed,n_boot);
1627   data seed_long(drop=i);
1628      call streaminit(&amp;amp;n_seed);
1629      do i = 1 to &amp;amp;n_boot;
1630        x_seed = floor(rand("Uniform")*500000); output;
1631      end;
1632   run;
1633
1634  data _null_;
1635     set seed_long;
1636     call symput('my_seed'|| compress(put(_n_,4.)), x_seed);
1637    run;
1638
1639     %let i=1;
1640     %do %until (&amp;amp;i&amp;gt;&amp;amp;n_boot) ;
1641        %mi(&amp;amp;missper,&amp;amp;n_imp,&amp;amp;n_seed);
1642        %let i = %eval(&amp;amp;i+1);
1643     %end;
1644  %mend large;
1645
1646  %large(20,5,3456,3);
MPRINT(LARGE):   data seed_long(drop=i);
MPRINT(LARGE):   call streaminit(3456);
MPRINT(LARGE):   do i = 1 to 3;
MPRINT(LARGE):   x_seed = floor(rand("Uniform")*500000);
MPRINT(LARGE):   output;
MPRINT(LARGE):   end;
MPRINT(LARGE):   run;

NOTE: The data set WORK.SEED_LONG has 3 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds


MPRINT(LARGE):   data _null_;
MPRINT(LARGE):   set seed_long;
MPRINT(LARGE):   call symput('my_seed'|| compress(put(_n_,4.)), x_seed);
MPRINT(LARGE):   run;
NOTE: Numeric values have been converted to character values at the places given by:
      (Line):(Column).
      5893:233
NOTE: There were 3 observations read from the data set WORK.SEED_LONG.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


proc mi data=eq seed=       95419 nimpute=5 out=EMIMP20
NOTE: Line generated by the invoked macro "TEM".
1            em itprint outem = outem;
             --
             180
MPRINT(TEM):   em itprint outem = outem;

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "TEM".
1                                          var y x z w;
                                           ---
                                           180
MPRINT(TEM):   var y x z w;

ERROR 180-322: Statement is not valid or it is used out of proper order.

MPRINT(TEM):   run;
MPRINT(MI):  ;
MPRINT(LARGE):  ;
proc mi data=eq seed=      450752 nimpute=5 out=EMIMP20
NOTE: Line generated by the invoked macro "TEM".
1            em itprint outem = outem;
             --
             180
MPRINT(TEM):   em itprint outem = outem;

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "TEM".
1                                          var y x z w;
                                           ---
                                           180
MPRINT(TEM):   var y x z w;

ERROR 180-322: Statement is not valid or it is used out of proper order.

MPRINT(TEM):   run;
MPRINT(MI):  ;
MPRINT(LARGE):  ;
proc mi data=eq seed=      436565 nimpute=5 out=EMIMP20
NOTE: Line generated by the invoked macro "TEM".
1            em itprint outem = outem;
             --
             180
MPRINT(TEM):   em itprint outem = outem;

ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "TEM".
1                                          var y x z w;
                                           ---
                                           180
MPRINT(TEM):   var y x z w;

ERROR 180-322: Statement is not valid or it is used out of proper order.

MPRINT(TEM):   run;
MPRINT(MI):  ;
MPRINT(LARGE):  ;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks for your suggestion. I don't know where is the 1 coming from. I am using sas for student. &lt;SPAN&gt;I can't&amp;nbsp;find a strange character now.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 04:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452282#M114129</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T04:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452283#M114130</link>
      <description>&lt;P&gt;Thanks for your suggestion. I tried %tem without macro and no problem. I tried some other macro with the %large %mi without any problem. The only difference is they only have one parameter &amp;amp;missper.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 04:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452283#M114130</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T04:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452284#M114131</link>
      <description>&lt;P&gt;That is easy to debug. You have inserted %PUT and it is "eating" the PROC statement.&lt;/P&gt;
&lt;PRE&gt;1615  %macro tem (missper,n_imp,n_seed);
1616  %PUT proc mi data=eq seed=&amp;amp;&amp;amp;my_seed&amp;amp;i nimpute=&amp;amp;n_imp out=EMIMP&amp;amp;missper;
1617      em itprint outem = outem;
1618      var y x z w;
1619      run;
1620  %mend tem;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Apr 2018 04:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452284#M114131</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-08T04:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452285#M114132</link>
      <description>&lt;P&gt;After I remove %put, It works. but I just added %put. where is the problem coming before it? and from the log, how did you find it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 04:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452285#M114132</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T04:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452287#M114133</link>
      <description>&lt;P&gt;Who knows what your other errors were about, but your original macro was so messed up perhaps you just left SAS in a confused state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message said where to look.&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Line generated by the invoked macro "TEM".&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;proc mi data=eq seed=       95419 nimpute=5 out=EMIMP20
NOTE: Line generated by the invoked macro "TEM".
1            em itprint outem = outem;
             --
             180
MPRINT(TEM):   em itprint outem = outem;&lt;/PRE&gt;
&lt;P&gt;Also notice how the PROC line does not have the MPRINT(TEM): in front of it like the EM and VAR lines.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 04:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452287#M114133</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-08T04:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452326#M114142</link>
      <description>&lt;P&gt;Thanks for your reply. I learned macro by myself.&amp;nbsp;Could you give me some suggestion how&amp;nbsp;to improve this macro or how to improve&amp;nbsp;my general knowledge about macro?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have a good&amp;nbsp;day&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 14:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-errors/m-p/452326#M114142</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-04-08T14:50:49Z</dc:date>
    </item>
  </channel>
</rss>

