<?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: Creating Dynamically named output files in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20557#M4271</link>
    <description>Ah yes.  I forgot to send the sas messages &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Variable tempeof is uninitialized.&lt;BR /&gt;
NOTE: Variable out is uninitialized.&lt;BR /&gt;
NOTE: The infile TEMP2 is:&lt;BR /&gt;
      Filename=\\Dgrfs-0\pgms\tsb\upid\upid7_html\tempFile.txt,&lt;BR /&gt;
      RECFM=V,LRECL=200,File Size (bytes)=4999,&lt;BR /&gt;
      Last Modified=12May2010:11:25:30,&lt;BR /&gt;
      Create Time=15Apr2010:11:38:30&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Physical file does not exist,&lt;BR /&gt;
       \\Dgrfs-0\pgms\tsb\upid7\upid7_html\Taos_PaseoDelCanonPaseoDelPuebloSur.html.    &amp;lt;-----  Interpreted and correct filename that I'm trying to create.&lt;BR /&gt;
NOTE: The file FNAME is:&lt;BR /&gt;
      Filename=\\Dgrfs-0\pgms\tsb\upid\fname.dat,&lt;BR /&gt;
      RECFM=V,LRECL=200,File Size (bytes)=0,&lt;BR /&gt;
      Last Modified=12May2010:11:25:31,&lt;BR /&gt;
      Create Time=12May2010:10:19:24&lt;BR /&gt;
&lt;BR /&gt;
NOTE: 0 records were read from the infile TEMP2.&lt;BR /&gt;
NOTE: 0 records were written to the file FNAME.&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.01 seconds</description>
    <pubDate>Wed, 12 May 2010 17:29:42 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-05-12T17:29:42Z</dc:date>
    <item>
      <title>Creating Dynamically named output files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20555#M4269</link>
      <description>Hey folks,&lt;BR /&gt;
    I am trying to create some dynamically named HTML files from our crash intersection data (one html page per intersection), and I'm having real difficulty getting sas to understand what my file should be called.  The name is generally &lt;CITY_INTERSECTION.HTML&gt;, where CITY = the city, and INTERSECTION = the name of the two roads crossing each other.&lt;BR /&gt;
&lt;BR /&gt;
Here is my code right now (I've tried several permutations):&lt;BR /&gt;
&lt;BR /&gt;
fName = compress("\\Dgrfs-0/pgms/tsb/upid7/upid7_html/&amp;amp;cityName._") || compress(compress(scan(fileStart2, 3, '&amp;lt;&amp;gt;'),'&amp;amp;')) || ".html";&lt;BR /&gt;
    putlog fName;&lt;BR /&gt;
    rc=filename("out",fName);&lt;BR /&gt;
    file out lrecl=&amp;amp;linesize. notitle noprint;&lt;BR /&gt;
&lt;BR /&gt;
So the idea is that out will change dynamically to the new file name.  The reality is that out.dat and fName.dat get created instead.&lt;BR /&gt;
&lt;BR /&gt;
   Also, this can't be done in the macro step because my intersections are dynamically created in my data, and not pre-known.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks much,&lt;BR /&gt;
-Jim&lt;/CITY_INTERSECTION.HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 17:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20555#M4269</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-12T17:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Dynamically named output files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20556#M4270</link>
      <description>You should be able to test your logic and observe the SAS-generated results with a simple standalone DATA step.  Also, it's unclear what the exact file-name format is expected to be, mostly because we don't see any SAS-generated log information revealing the code/text substitution.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 12 May 2010 17:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20556#M4270</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-12T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Dynamically named output files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20557#M4271</link>
      <description>Ah yes.  I forgot to send the sas messages &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Variable tempeof is uninitialized.&lt;BR /&gt;
NOTE: Variable out is uninitialized.&lt;BR /&gt;
NOTE: The infile TEMP2 is:&lt;BR /&gt;
      Filename=\\Dgrfs-0\pgms\tsb\upid\upid7_html\tempFile.txt,&lt;BR /&gt;
      RECFM=V,LRECL=200,File Size (bytes)=4999,&lt;BR /&gt;
      Last Modified=12May2010:11:25:30,&lt;BR /&gt;
      Create Time=15Apr2010:11:38:30&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Physical file does not exist,&lt;BR /&gt;
       \\Dgrfs-0\pgms\tsb\upid7\upid7_html\Taos_PaseoDelCanonPaseoDelPuebloSur.html.    &amp;lt;-----  Interpreted and correct filename that I'm trying to create.&lt;BR /&gt;
NOTE: The file FNAME is:&lt;BR /&gt;
      Filename=\\Dgrfs-0\pgms\tsb\upid\fname.dat,&lt;BR /&gt;
      RECFM=V,LRECL=200,File Size (bytes)=0,&lt;BR /&gt;
      Last Modified=12May2010:11:25:31,&lt;BR /&gt;
      Create Time=12May2010:10:19:24&lt;BR /&gt;
&lt;BR /&gt;
NOTE: 0 records were read from the infile TEMP2.&lt;BR /&gt;
NOTE: 0 records were written to the file FNAME.&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.01 seconds</description>
      <pubDate>Wed, 12 May 2010 17:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20557#M4271</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-12T17:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Dynamically named output files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20558#M4272</link>
      <description>I have solved it.  The file name is too long (though the error messages don't report this issue, just that the file doesn't exist).&lt;BR /&gt;
Thanks for your help!&lt;BR /&gt;
-Jim</description>
      <pubDate>Wed, 12 May 2010 18:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Dynamically-named-output-files/m-p/20558#M4272</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-12T18:57:40Z</dc:date>
    </item>
  </channel>
</rss>

