BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ZeeG
Calcite | Level 5

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

2 REPLIES 2
mohamed_zaki
Barite | Level 11

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';

 

Reeza
Super User

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'

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 4287 views
  • 1 like
  • 3 in conversation