Write and run SAS programs in your web browser

SAS Studio Import External .dat file under Mac OS System. Report path invalid Error.

Accepted Solution Solved
Reply
Learner
Posts: 1
Accepted Solution

SAS Studio Import External .dat file under Mac OS System. Report path invalid Error.

Hello! 

I just started learning SAS by following The Little SAS Book using SAS Studio University edition. For one example on the book, I changed the inflie path to the location of the dat file on my laptop which is 

 '/Users/Zee/Documents/Programming/SASUniversityEdition/myfolders/ToadJump.dat'

 

the code is like this:

 

* Create a SAS data set named toads;

*Read the data file ToadJump.dat using list input;

DATA toads;

INFILE '/Users/Zee/Documents/Programming/SASUniversityEdition/myfolders/ToadJump.dat';

INPUT ToadName $ Weight Jump1 Jump2 Jump3;

RUN;

* Print the data to make sure the file was read correctly;

PROC PRINT DATA = toads;

TITLE 'SAS Data Set Toads';

RUN;

 

One Erro was reported from Log:

ERROR: The path /Users/Zee/Documents/Programming/SASUniversityEdition/myfolders/ToadJump.dat is not in the list of accessible paths when SAS is in the lockdown state.
 
Then I checked my the VirtualBox shared folder location

'/Users/Zee/Documents/Programming/SASUniversityEdition/myfolders'

 

compare to the infile path, I don't know why it reports this erro.

(INFILE '/Users/Zee/Documents/Programming/SASUniversityEdition/myfolders/ToadJump.dat')

 

 

Please tell me where I got it wrong and how to fix it, really apprecaite your help, thanks!

 


Accepted Solutions
Solution
‎03-13-2016 02:35 PM
Grand Advisor
Posts: 16,419

Re: SAS Studio Import External .dat file under Mac OS System. Report path invalid Error.

[ Edited ]

Your path to your file is correct, but that's not how you reference.

 

SAS UE is in a VM so it has a 'mapped directory'. From SAS UE which is a separate computer that you're accessing from your computer, the correct code is below. Also, because it's Unix, it's case sensitive so the file name must be specified exactly as it is in the OS. 

'/folders/myfolders/ToadJump.dat'

 

View solution in original post


All Replies
Super Contributor
Posts: 490

Re: SAS Studio Import External .dat file under Mac OS System. Report path invalid Error.

After you add your data to the shared folder. You should be able to see them from SAS Studio "Server Files and Folders".

And to access this shared folder from a SAS program, use /folders/myfolders.

 

So for example your path to the data file, should be like 

INFILE '/folders/myfolders/ToadJump.dat';

 

Solution
‎03-13-2016 02:35 PM
Grand Advisor
Posts: 16,419

Re: SAS Studio Import External .dat file under Mac OS System. Report path invalid Error.

[ Edited ]

Your path to your file is correct, but that's not how you reference.

 

SAS UE is in a VM so it has a 'mapped directory'. From SAS UE which is a separate computer that you're accessing from your computer, the correct code is below. Also, because it's Unix, it's case sensitive so the file name must be specified exactly as it is in the OS. 

'/folders/myfolders/ToadJump.dat'

 

Post a Question
Discussion Stats
  • 2 replies
  • 392 views
  • 1 like
  • 3 in conversation