title: do loop within a macro
body: <p>The code below is returning the following error message:</p>
  <p><code>Syntax error, expecting one of the following: a name, INPUT, PUT.</code></p>
  <pre><code>%macro run_calculation(amt, t, r);
      data customer_value;
      i=&amp;r./100.; 
      do n=0 to t;
      S=&amp;amt.*[(1+ calculated i)^t - 1]/calculated i
      end;
      run;
  %mend;
  
  
  %run_calculation(amt=1000, t=8, r=5);
  </code></pre>
  <p>Expected output is S value at each t in a table.</p>