12-01-2017 02:50 AM - edited 12-01-2017 02:53 AM
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:
However, SAS is able to show only the local drives (C, D and E here). None of the mapped network drives is shown :
My local drives and network drives can be accessed on my computer:
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.
12-01-2017 03:25 AM
You do not import a .sas7bdat file, as it is already a SAS dataset.
What happens if you try
libname labdata 'Z:\labdata';
12-01-2017 04:45 AM
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;