<?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: Error when trying to read filenames in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15392#M2029</link>
    <description>See if this is related to your problem&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/41/863.html" target="_blank"&gt;http://support.sas.com/kb/41/863.html&lt;/A&gt;</description>
    <pubDate>Thu, 16 Jun 2011 20:31:41 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2011-06-16T20:31:41Z</dc:date>
    <item>
      <title>Error when trying to read filenames</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15390#M2027</link>
      <description>I have encountered a strange error.  I am using the following code to read filenames that match a given pattern:&lt;BR /&gt;
&lt;BR /&gt;
   filename DIR pipe "dir /B c:\thisdir\abc123*.dat";&lt;BR /&gt;
   data dirlist;&lt;BR /&gt;
      length file $20;&lt;BR /&gt;
      infile DIR length=reclen;&lt;BR /&gt;
      input file $varying20. reclen;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
When I run this code everything works as expected.  When one of my colleges runs this same code from his account, he gets this error:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The infile DIR is:&lt;BR /&gt;
      Unnamed Pipe Access Device,&lt;BR /&gt;
      PROCESS=dir /B c:\thisdir\abc123*.dat,RECFM=V,&lt;BR /&gt;
      LRECL=256&lt;BR /&gt;
&lt;BR /&gt;
Stderr output:&lt;BR /&gt;
There is not enough space on the disk.&lt;BR /&gt;
NOTE: 0 records were read from the infile DIR.&lt;BR /&gt;
NOTE: The data set WORK.DIRLIST has 0 observations and 1 variables.&lt;BR /&gt;
&lt;BR /&gt;
There is plenty of disk space on all disks.  So, this error is more likely the result of a permission problem, but where?  Does anyone have any ideas?</description>
      <pubDate>Thu, 16 Jun 2011 19:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15390#M2027</guid>
      <dc:creator>WesBarris</dc:creator>
      <dc:date>2011-06-16T19:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to read filenames</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15391#M2028</link>
      <description>Pardon me for replying to my own question but I have some more information to add.&lt;BR /&gt;
&lt;BR /&gt;
If I start sas by double clicking on a sas icon pinned to the startmenu or taskbar&lt;BR /&gt;
the following code works:&lt;BR /&gt;
&lt;BR /&gt;
filename DIR pipe "dir /B";&lt;BR /&gt;
data dirlist ;&lt;BR /&gt;
     length file $20;&lt;BR /&gt;
     infile DIR length=reclen;&lt;BR /&gt;
     input file $varying20. reclen;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data = dirlist;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, if I start sas by clicking on "Start -&amp;gt; All Programs -&amp;gt; SAS -&amp;gt; SAS 9.2 (English) that same code results in this error:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The infile DIR is:&lt;BR /&gt;
      Unnamed Pipe Access Device,&lt;BR /&gt;
      PROCESS=dir /B,RECFM=V,LRECL=256&lt;BR /&gt;
&lt;BR /&gt;
Stderr output:&lt;BR /&gt;
There is not enough space on the disk.&lt;BR /&gt;
NOTE: 0 records were read from the infile DIR.&lt;BR /&gt;
&lt;BR /&gt;
I am at a loss to figure out why.  Both shortcuts seem to be set up identically.  If I&lt;BR /&gt;
drag the SAS shortcut that was pinned to the startmenu to the desktop and start SAS from that, it fails with the error.&lt;BR /&gt;
&lt;BR /&gt;
We are running SAS 9.2 on Windows Server 2008.  I need to understand the reason for this error so that I can modify the code to run no matter how sas is started.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Thu, 16 Jun 2011 20:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15391#M2028</guid>
      <dc:creator>WesBarris</dc:creator>
      <dc:date>2011-06-16T20:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to read filenames</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15392#M2029</link>
      <description>See if this is related to your problem&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/41/863.html" target="_blank"&gt;http://support.sas.com/kb/41/863.html&lt;/A&gt;</description>
      <pubDate>Thu, 16 Jun 2011 20:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-trying-to-read-filenames/m-p/15392#M2029</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-06-16T20:31:41Z</dc:date>
    </item>
  </channel>
</rss>

