<?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: Read remote files on network drives in SAS Base in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417667#M102608</link>
    <description>&lt;P&gt;Misspelling? Try sas7bdat not sas7bat.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2017 08:00:52 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2017-12-01T08:00:52Z</dc:date>
    <item>
      <title>Read remote files on network drives in SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417664#M102607</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running SAS 9.4 TS Level 1M3 on 64 bit Windows 7 PRO. I was wondering how remote files on network drives into SAS installed in my&amp;nbsp;local machine. I am able to view my remote files in my web browser, as the following screenshot shows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mappedNetworkDriveZ.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16949i3A5529313A2A5B70/image-size/large?v=v2&amp;amp;px=999" role="button" title="mappedNetworkDriveZ.png" alt="mappedNetworkDriveZ.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, SAS is able to show only the local drives (C, D and E here). None of the mapped network drives is&amp;nbsp;shown :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_contentsOfComputer.png" style="width: 326px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16950iBAD284EE89FF49C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS_contentsOfComputer.png" alt="SAS_contentsOfComputer.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My local drives and network drives can be accessed on my computer:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="localDrives_networkDrives.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16951i4AE9923BFB3D2D86/image-size/large?v=v2&amp;amp;px=999" role="button" title="localDrives_networkDrives.png" alt="localDrives_networkDrives.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to read the remote files in SAS base. But none of the following code works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename outfile 
	sftp '/mnt/lustre/working/lab_xMan/xMan/PRS_UKB_201711/allelicScoresCompiled/output/uniqSNPs_allUKBs_Release8-HRCr1.1/dosageFam_Release8_HRCr1.1/innerJoinedSNPsByCHRBP_metaDataQCed_Release8_HRCr1.1_AND_GWASQCedChrConcat_UKBAllPhenotypes/sasTest.sas7bat'
	host="hpcapp01.adqimr.ad.lan"
	user="xMan"; /*actual username is masked*/
data _null_;
   file outfile;
   do i=1 to 10;
      put i=;
   end;
run;

/*access files in mapped drive Z. Not working*/
filename a "Z:\LabData\testdiagIRT.sas7bat";
%put %sysfunc(pathname(a));
data test; file a; run;

/*access files in mapped drive Z. Not working*/
proc import datafile= "Z:\LabData\testdiagIRT.sas7bat"
	out=test 
	dbms=dlm replace;
	datarow=2;
	GETNAMES=YES;
	guessingrows=2328;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How do I connect SAS to my network drives? Some posts suggest to check&amp;nbsp;SAS/CONNECT. My SAS was installed&amp;nbsp;2 years ago. I cannot recall if SAS/CONNECT was installed nor could I see such a folder under my&amp;nbsp;C:\Program Files\SASHome&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone provide (a link to) a step by step guide for connecting mapped network drives in SAS Base? I saw some posts about this but it is in SAS EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 07:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417664#M102607</guid>
      <dc:creator>Chang</dc:creator>
      <dc:date>2017-12-01T07:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read remote files on network drives in SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417667#M102608</link>
      <description>&lt;P&gt;Misspelling? Try sas7bdat not sas7bat.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 08:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417667#M102608</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-12-01T08:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read remote files on network drives in SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417668#M102609</link>
      <description>&lt;P&gt;You do not import a .sas7bdat file, as it is already a SAS dataset.&lt;/P&gt;
&lt;P&gt;What happens if you try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname labdata 'Z:\labdata';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 08:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417668#M102609</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-01T08:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read remote files on network drives in SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417703#M102612</link>
      <description>&lt;P&gt;Per the second screenshot, you are accessing the files located on a Windows server, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have this kinds of mapping drive at work environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try to libname the full path, not the Z shortcut, which in your case :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname zdrive "\\hpcsmb\LabData\" ; *\\hpcsmb is the server name, and please make sure this is the full path;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 09:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-remote-files-on-network-drives-in-SAS-Base/m-p/417703#M102612</guid>
      <dc:creator>ifendo</dc:creator>
      <dc:date>2017-12-01T09:45:30Z</dc:date>
    </item>
  </channel>
</rss>

