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'

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3709 views
  • 1 like
  • 3 in conversation