<?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: Using Filename to Get List of Files on Different Server in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873916#M38767</link>
    <description>&lt;P&gt;Since SAS is running on Unix to see the Windows share you would need to mount it to the Unix filesystem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could map the top level of the share&amp;nbsp; \\server.com\share to some Unix path such as /mnt/server.com/share or what ever naming convention your Unix shop wants to use.&lt;/P&gt;
&lt;P&gt;Or you could mount just some sub-directory of the Windows share to to a path on Unix instead.&amp;nbsp; Perhaps you might want them to mount&amp;nbsp;\\server.com\share$\Wes\Data as&amp;nbsp;/sas/data/Wes_Data/;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Talk to you system team to see if they can help you get them mapped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 16:30:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-05-04T16:30:13Z</dc:date>
    <item>
      <title>Using Filename to Get List of Files on Different Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873897#M38763</link>
      <description>&lt;P&gt;I am on SAS Grid, Linux installation.&amp;nbsp; I have used this code before to get a list of all of the files in a directory.&amp;nbsp; However, today I have a folder that's on a Windows server and I am wondering if there is a way to adapt this code to this problem.&amp;nbsp; What I mostly would need is a way to specify the server to go to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let folder = /sas/data/Risk_Mgmt/;

/*Get list of files in txt folder*/
data gl_txts;
length fref $8 fname $200;
did = filename(fref,"&amp;amp;folder.");
did = dopen(fref);
do i = 1 to dnum(did);
  fname = dread(did,i);
  output;
end;
did = dclose(did);
did = filename(fref);
keep fname;
run;&lt;/PRE&gt;&lt;P&gt;Trying to adapt it to accept something like:&lt;/P&gt;&lt;P&gt;%let folder = \\server.com\share$\Wes\Data;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 15:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873897#M38763</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2023-05-04T15:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Filename to Get List of Files on Different Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873914#M38766</link>
      <description>&lt;P&gt;The Windows server's resource needs to be mounted in the Linux file system for this to work. Talk to your SAS server administrator.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 16:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873914#M38766</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-04T16:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Filename to Get List of Files on Different Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873916#M38767</link>
      <description>&lt;P&gt;Since SAS is running on Unix to see the Windows share you would need to mount it to the Unix filesystem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could map the top level of the share&amp;nbsp; \\server.com\share to some Unix path such as /mnt/server.com/share or what ever naming convention your Unix shop wants to use.&lt;/P&gt;
&lt;P&gt;Or you could mount just some sub-directory of the Windows share to to a path on Unix instead.&amp;nbsp; Perhaps you might want them to mount&amp;nbsp;\\server.com\share$\Wes\Data as&amp;nbsp;/sas/data/Wes_Data/;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Talk to you system team to see if they can help you get them mapped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 16:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873916#M38767</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-04T16:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Filename to Get List of Files on Different Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873934#M38769</link>
      <description>&lt;P&gt;I was hopeful that since I'm not trying to copy or move the files, that I would be able to just list them somehow.&amp;nbsp; Open to any ideas.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 17:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873934#M38769</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2023-05-04T17:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Filename to Get List of Files on Different Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873939#M38772</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151081"&gt;@ProcWes&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I was hopeful that since I'm not trying to copy or move the files, that I would be able to just list them somehow.&amp;nbsp; Open to any ideas.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have to access the disk to read the list of files, whether or not you read the files themselves.&lt;/P&gt;
&lt;P&gt;Other methods:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Generate the list on your PC and upload the list to Unix so SAS can read it.&lt;/LI&gt;
&lt;LI&gt;Have your SAS session signon to some other machine that has access to the share and generate the list of files and copy it back to the machine where SAS is running so it can read.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 04 May 2023 17:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Filename-to-Get-List-of-Files-on-Different-Server/m-p/873939#M38772</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-04T17:17:39Z</dc:date>
    </item>
  </channel>
</rss>

