Learning SAS? Welcome to the exclusive online community for all SAS learners.

SAS won't read the correct file to import data

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

SAS won't read the correct file to import data

For some reason, when I try to run code now, SAS cannot find the correct folder that I have been using for years.  Is it an iCloud issue (I am using a MacBook).  See the code below - the first line of code is where the file is and it doesn't work.  This is the error message for the first attempt:

 

ERROR: The path
/Users/victordicenzo/Documents/SASUniversityEdition/myfolders/2017/Claytor/COVER.XLSX is not
in the list of accessible paths when SAS is in the lockdown state.
 

The second line is what I have used for several years and it doesn't locate the file either.  

 

ERROR: Physical file does not exist, /folders/myfolders/2017/CLAYTOR//EFFORT.XLSX.

 

 

Here is the actual code to import the data:

 

/** Import an XLSX file.  **/

PROC IMPORT DATAFILE="/Users/victordicenzo/Documents/SASUniversityEdition/myfolders/2017/Claytor/COVER.XLSX"
OUT=WORK.COVER
DBMS=XLSX
REPLACE;
RUN;

/** Import an XLSX file. **/

PROC IMPORT DATAFILE="/folders/myfolders/2017/CLAYTOR/EFFORT.XLSX"
OUT=WORK.EFFORT
DBMS=XLSX
REPLACE;
RUN;

 

I am not sure what happened and could use some assistance. Thanks.

 


Accepted Solutions
Solution
a month ago
Super User
Super User
Posts: 8,284

Re: SAS won't read the correct file to import data

Posted in reply to vicdicenzo

On a Unix machine filenames are case sensitive.  So CLAYTOR is NOT the same filename as Claytor.

 

Sounds like you are using SAS UE. Which means that it is running in a virtual Unix machine so that it can only see the files in the mapped location.  That is why the path that starts /folders/myfolders/ should be able to work.

 

Locate the file in the SAs/Studio interface and select Properties for the file.  You should see the exact path that the SAS server can use to access the file.

View solution in original post


All Replies
Solution
a month ago
Super User
Super User
Posts: 8,284

Re: SAS won't read the correct file to import data

Posted in reply to vicdicenzo

On a Unix machine filenames are case sensitive.  So CLAYTOR is NOT the same filename as Claytor.

 

Sounds like you are using SAS UE. Which means that it is running in a virtual Unix machine so that it can only see the files in the mapped location.  That is why the path that starts /folders/myfolders/ should be able to work.

 

Locate the file in the SAs/Studio interface and select Properties for the file.  You should see the exact path that the SAS server can use to access the file.

Occasional Contributor
Posts: 19

Re: SAS won't read the correct file to import data

Thanks!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 151 views
  • 0 likes
  • 2 in conversation