title: Create dynamic filenames via sas macro variables
body: <p>I am in the process of creating dynamic webfiles via a stored process. The ouput file are generated via proc stream. However I am doing something wrong whilest creating the dynamic file paths.
  The following simplified example works:</p>
  
  <pre><code>FILENAME hello 'D:\test\hello.html';
  proc stream outfile=hello; begin
      hello world
  ;;;;
  </code></pre>
  
  <p>However when I try to dynamically create files using a do loop, I am not getting any output at all. (no errors as well)</p>
  
  <pre><code>%do i=1 %to 3;
      %let outputFileName = D:\test\&amp;i%str(.html);
      FILENAME hello '&amp;outputFileName';
      proc stream outfile=hello;   begin
          Hello world
      ;;;;
  %end;
  </code></pre>
  
  <p>If I put the outputFileName variable, I can see my path is the way it is supposed to be.</p>
  
  <p>Any ideas?</p>