BookmarkSubscribeRSS Feed
Chang
Quartz | Level 8

hi,

 

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 local machine. I am able to view my remote files in my web browser, as the following screenshot shows:

mappedNetworkDriveZ.png

 

However, SAS is able to show only the local drives (C, D and E here). None of the mapped network drives is shown :

SAS_contentsOfComputer.png

 

 

My local drives and network drives can be accessed on my computer:

localDrives_networkDrives.png

 

I have tried to read the remote files in SAS base. But none of the following code works

 

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;

How do I connect SAS to my network drives? Some posts suggest to check SAS/CONNECT. My SAS was installed 2 years ago. I cannot recall if SAS/CONNECT was installed nor could I see such a folder under my C:\Program Files\SASHome

 

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.

 

Thanks

3 REPLIES 3
SASKiwi
PROC Star

Misspelling? Try sas7bdat not sas7bat.

ifendo
Obsidian | Level 7

Per the second screenshot, you are accessing the files located on a Windows server, right?

 

I also have this kinds of mapping drive at work environment.

 

You can try to libname the full path, not the Z shortcut, which in your case :


libname zdrive "\\hpcsmb\LabData\" ; *\\hpcsmb is the server name, and please make sure this is the full path; 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 6534 views
  • 5 likes
  • 4 in conversation