<?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: Problem with a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426689#M105155</link>
    <description>&lt;P&gt;The macro doesn't display anything, it inserts value into your table. Check your table.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 21:44:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-10T21:44:39Z</dc:date>
    <item>
      <title>Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426651#M105133</link>
      <description>&lt;P&gt;Hi, I made a program which put the x and y coordonates when a condition is verified but I have an error generated in SAS,&lt;/P&gt;&lt;P&gt;here some informations :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro mandelbrot(x_min,x_max,y_min,y_max,pas,seuil,n_max);
%let pas_coef=&amp;amp;pas.*100;
%let x_min_coef=(&amp;amp;x_min.*100);
%let x_max_coef=(&amp;amp;x_max.*100);
%let y_min_coef=(&amp;amp;y_min.*100);
%let y_max_coef=(&amp;amp;y_max.*100);
%let u=0;
%let v=0;
         %do i=&amp;amp;x_min_coef. %to &amp;amp;x_max_coef. by &amp;amp;pas_coef.;
             %do j=&amp;amp;y_min_coef. %to &amp;amp;y_max_coef. by &amp;amp;pas_coef.;
                  %let n=0;
                  %let u=0;
                  %let v=0;
                  %let &amp;amp;norm=0;
                  %let x_r=%sysevalf(&amp;amp;i./100);
                  %let y_r=%sysevalf(&amp;amp;j./100);
                  %do %while(&amp;amp;norm.&amp;lt;&amp;amp;seuil. and &amp;amp;n.&amp;lt;&amp;amp;nmax.);
                       %let n=%eval(1+&amp;amp;n.);
                       %let u=%sysevalf((&amp;amp;u.)**2-(&amp;amp;v.)**2+&amp;amp;x_r.);
                       %let v=%sysevalf(2*(&amp;amp;u.)*(&amp;amp;v.)+&amp;amp;y_r.);
                       %let &amp;amp;norm=%module_2(&amp;amp;u.,&amp;amp;v.);
				  %end;
                  
       	 %if (&amp;amp;norm.&amp;lt;&amp;amp;seuil.) %then %do;
			proc sql;
			insert into MANDELBROT values (&amp;amp;x_r.,&amp;amp;y_r.);
			quit;
	    %end;
	   %end;
%end;
%mend mandelbrot;
%mandelbrot(-2,0.5,-1.1,1.1,0.02,2,30);&lt;/PRE&gt;&lt;P&gt;The error :&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&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was: &amp;amp;x_max_coef. by &amp;amp;pas_coef.&lt;BR /&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: The macro MANDELBROT will stop executing.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426651#M105133</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426659#M105137</link>
      <description>&lt;P&gt;should be %by instead of by coz you are using macro language needing macro syntax for the macro processor to recognize&lt;/P&gt;&lt;PRE&gt; %do i=&amp;amp;x_min_coef. %to &amp;amp;x_max_coef. %by &amp;amp;pas_coef.;
             %do j=&amp;amp;y_min_coef. %to &amp;amp;y_max_coef. %by &amp;amp;pas_coef.;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426659#M105137</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T21:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426660#M105138</link>
      <description>&lt;P&gt;A %DO loop likely wants a %BY rather than BY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185408"&gt;@Num19&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi, I made a program which put the x and y coordonates when a condition is verified but I have an error generated in SAS,&lt;/P&gt;
&lt;P&gt;here some informations :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%macro mandelbrot(x_min,x_max,y_min,y_max,pas,seuil,n_max);
%let pas_coef=&amp;amp;pas.*100;
%let x_min_coef=(&amp;amp;x_min.*100);
%let x_max_coef=(&amp;amp;x_max.*100);
%let y_min_coef=(&amp;amp;y_min.*100);
%let y_max_coef=(&amp;amp;y_max.*100);
%let u=0;
%let v=0;
         %do i=&amp;amp;x_min_coef. %to &amp;amp;x_max_coef. by &amp;amp;pas_coef.;
             %do j=&amp;amp;y_min_coef. %to &amp;amp;y_max_coef. by &amp;amp;pas_coef.;
                  %let n=0;
                  %let u=0;
                  %let v=0;
                  %let &amp;amp;norm=0;
                  %let x_r=%sysevalf(&amp;amp;i./100);
                  %let y_r=%sysevalf(&amp;amp;j./100);
                  %do %while(&amp;amp;norm.&amp;lt;&amp;amp;seuil. and &amp;amp;n.&amp;lt;&amp;amp;nmax.);
                       %let n=%eval(1+&amp;amp;n.);
                       %let u=%sysevalf((&amp;amp;u.)**2-(&amp;amp;v.)**2+&amp;amp;x_r.);
                       %let v=%sysevalf(2*(&amp;amp;u.)*(&amp;amp;v.)+&amp;amp;y_r.);
                       %let &amp;amp;norm=%module_2(&amp;amp;u.,&amp;amp;v.);
				  %end;
                  
       	 %if (&amp;amp;norm.&amp;lt;&amp;amp;seuil.) %then %do;
			proc sql;
			insert into MANDELBROT values (&amp;amp;x_r.,&amp;amp;y_r.);
			quit;
	    %end;
	   %end;
%end;
%mend mandelbrot;
%mandelbrot(-2,0.5,-1.1,1.1,0.02,2,30);&lt;/PRE&gt;
&lt;P&gt;The error :&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&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was: &amp;amp;x_max_coef. by &amp;amp;pas_coef.&lt;BR /&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: The macro MANDELBROT will stop executing.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426660#M105138</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-10T21:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426662#M105139</link>
      <description>&lt;P&gt;Oh, sorry for that mistake.&lt;/P&gt;&lt;P&gt;Now I have :&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&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was: &amp;amp;x_max_coef.&lt;BR /&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was: &amp;amp;pas_coef.&lt;BR /&gt;ERROR: The %BY value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: The macro MANDELBROT will stop executing.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426662#M105139</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426666#M105141</link>
      <description>&lt;P&gt;sorry my bad that i didn't notice at the top, you need&lt;STRONG&gt; %eval&lt;/STRONG&gt; in your %let assignments&lt;/P&gt;&lt;P&gt;or to be safe &lt;STRONG&gt;%sysevalf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let pas_coef=&amp;amp;pas.*100;&lt;BR /&gt;%let x_min_coef=(&amp;amp;x_min.*100);&lt;BR /&gt;%let x_max_coef=(&amp;amp;x_max.*100);&lt;BR /&gt;%let y_min_coef=(&amp;amp;y_min.*100);&lt;BR /&gt;%let y_max_coef=(&amp;amp;y_max.*100);&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426666#M105141</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T21:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426669#M105142</link>
      <description>&lt;P&gt;Error on error I have this one now :&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&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was: 0.02*100&lt;BR /&gt;ERROR: The macro MANDELBROT will stop executing.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426669#M105142</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426671#M105144</link>
      <description>&lt;P&gt;1. Replace BY with %BY&lt;/P&gt;
&lt;P&gt;2. Set parameters using %SYSEVALF()&lt;/P&gt;
&lt;P&gt;3. Fix Norm value declaration (not &amp;amp;norm, remove &amp;amp;).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. NMAX is undeclared/not calculated???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro mandelbrot(x_min,x_max,y_min,y_max,pas,seuil,n_max);
%let pas_coef=%sysevalf(&amp;amp;pas.*100);
%let x_min_coef=%sysevalf(&amp;amp;x_min.*100);
%let x_max_coef=%sysevalf(&amp;amp;x_max.*100);
%let y_min_coef=%sysevalf(&amp;amp;y_min.*100);
%let y_max_coef=%sysevalf(&amp;amp;y_max.*100);
%let u=0;
%let v=0;
         %do i=&amp;amp;x_min_coef. %to &amp;amp;x_max_coef. %by &amp;amp;pas_coef.;
             %do j=&amp;amp;y_min_coef. %to &amp;amp;y_max_coef. %by &amp;amp;pas_coef.;
                  %let n=0;
                  %let u=0;
                  %let v=0;
                  %let norm=0;
                  %let x_r=%sysevalf(&amp;amp;i./100);
                  %let y_r=%sysevalf(&amp;amp;j./100);
                  %do %while(&amp;amp;norm.&amp;lt;&amp;amp;seuil. and &amp;amp;n.&amp;lt;&amp;amp;nmax.);
                       %let n=%eval(1+&amp;amp;n.);
                       %let u=%sysevalf((&amp;amp;u.)**2-(&amp;amp;v.)**2+&amp;amp;x_r.);
                       %let v=%sysevalf(2*(&amp;amp;u.)*(&amp;amp;v.)+&amp;amp;y_r.);
                       %let &amp;amp;norm=%module_2(&amp;amp;u.,&amp;amp;v.);
				  %end;
                  
       	 %if (&amp;amp;norm.&amp;lt;&amp;amp;seuil.) %then %do;
			proc sql;
			insert into MANDELBROT values (&amp;amp;x_r.,&amp;amp;y_r.);
			quit;
	    %end;
	   %end;
%end;
%mend mandelbrot;
%mandelbrot(-2,0.5,-1.1,1.1,0.02,2,30);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A little bit closer....it seems like this would be easier/faster in a data step or PROC IML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It says NMAX isn't declared, which is true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426671#M105144</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-10T21:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426672#M105145</link>
      <description>&lt;P&gt;Mate!, use %sysevalf&amp;nbsp; instead of %eval&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426672#M105145</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T21:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426674#M105146</link>
      <description>&lt;P&gt;I think that's so close, I have this now :&lt;/P&gt;&lt;P&gt;ERROR: Expecting a variable name after %LET.&lt;BR /&gt;ERROR: Symbolic variable name 0 must begin with a letter or underscore.&lt;BR /&gt;ERROR: The macro MANDELBROT will stop executing.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426674#M105146</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426675#M105147</link>
      <description>&lt;P&gt;problem is this&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;  &lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; norm&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;; causing vairable name issue hahahahha&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426675#M105147</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T21:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426676#M105148</link>
      <description>And n_max in the macro list versus nmax used in the code.....</description>
      <pubDate>Wed, 10 Jan 2018 21:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426676#M105148</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-10T21:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426677#M105149</link>
      <description>&lt;P&gt;that is causing error in macro var creation here&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;    &lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;norm&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token macroname"&gt;%module_2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;u&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;v&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&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;all same names begin with a letter or underscore&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426677#M105149</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T21:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426684#M105152</link>
      <description>&lt;P&gt;No error displayed but I have nothing displayed by the macro&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426684#M105152</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426687#M105154</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;sorry my bad that i didn't notice at the top, you need&lt;STRONG&gt; %eval&lt;/STRONG&gt; in your %let assignments&lt;/P&gt;
&lt;P&gt;or to be safe &lt;STRONG&gt;%sysevalf&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let pas_coef=&amp;amp;pas.*100;&lt;BR /&gt;%let x_min_coef=(&amp;amp;x_min.*100);&lt;BR /&gt;%let x_max_coef=(&amp;amp;x_max.*100);&lt;BR /&gt;%let y_min_coef=(&amp;amp;y_min.*100);&lt;BR /&gt;%let y_max_coef=(&amp;amp;y_max.*100);&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;AND&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;%eval only does integers.&lt;/P&gt;
&lt;P&gt;See&lt;/P&gt;
&lt;PRE&gt;2740  %let junk= %eval(0.5 *100);
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
       operand is required. The condition was: 0.5 *100
&lt;/PRE&gt;
&lt;P&gt;Yes you would need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0080" face="SAS Monospace" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt; junk= &lt;/FONT&gt;&lt;FONT color="#ff0080" face="SAS Monospace" size="2"&gt;%sysevalf&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(0.5 *100);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;HOWEVER since you are using those values in %do loops ALL the values must be integers on the %do statements. The macro language doesn't work with %do x= .5 %to 10 %by .5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;Of course the question is why are you doing data processing in the macro language to begin with???&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;Especially to do an INSERT into a set using Proc SQL? I don't know what your %module_2 macro does but I'm willing to be this can all be turned into a data step relatively easily.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426687#M105154</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-10T21:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426689#M105155</link>
      <description>&lt;P&gt;The macro doesn't display anything, it inserts value into your table. Check your table.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426689#M105155</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-10T21:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426693#M105158</link>
      <description>&lt;P&gt;Sorry I meant when I check my table I have a lot of -2, 0 -1, 1 but I don't have decimal numbers.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426693#M105158</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T21:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426699#M105161</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185408"&gt;@Num19&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Sorry I meant when I check my table I have a lot of -2, 0 -1, 1 but I don't have decimal numbers.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since you only insert a couple of variables into your table you won't have much info for diagnostics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely to generate a lot of junk but try running&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options mprint symbolgen;&lt;/P&gt;
&lt;P&gt;before the macro. I could show where your values aren't being kept or such.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also what does the %module_2 macro actually look like? That might be the cause since it is setting the value of one of your variables. If it sets a large value for norm then you may not have many times when norm&amp;lt; seuil at the test for insertion.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426699#M105161</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-10T22:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426702#M105163</link>
      <description>&lt;P&gt;I completely agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;.&amp;nbsp; You are making this an order of magnitude harder than it needs to be by using the macro language instead of a DATA step.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426702#M105163</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-01-10T22:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426707#M105166</link>
      <description>&lt;P&gt;Here is module's code :&lt;/P&gt;&lt;PRE&gt;%macro module_2(x_1,y_2);
%global norme_2;
%let xcarre=(&amp;amp;x_1**2);
%let ycarre=(&amp;amp;y_2**2);
%let normecarre=%sysevalf(&amp;amp;xcarre+&amp;amp;ycarre);
%let norme_2=%sysfunc(sqrt(&amp;amp;normecarre));
%mend module_2;

%module_2(2,3);&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426707#M105166</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-10T22:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426717#M105169</link>
      <description>&lt;P&gt;missing %sysevalf here mate!&lt;/P&gt;&lt;PRE&gt;%let xcarre=(&amp;amp;x_1**2);
%let ycarre=(&amp;amp;y_2**2);&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-a-macro/m-p/426717#M105169</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-10T22:40:28Z</dc:date>
    </item>
  </channel>
</rss>

