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

Hi,

I am using a mac system OS X Yosemite 10.10.1

running the code on University SAS Studio:

libname sasintro '/Users/biweichen1989/Desktop/SASUniversityEdition/myfolders';

run;

I already shared the path in VMware setting, but always get the same error message:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 libname sasintro '/Users/biweichen1989/Desktop/SASUniversityEdition/myfolders';

ERROR: The path /Users/biweichen1989/Desktop/SASUniversityEdition/myfolders is invalid because it is not in the list of accessible

  paths when SAS is in the lockdown state.

ERROR: Error in the LIBNAME statement.

44 run;

45 ;

46 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

56 ;

Please help. If it is due to the lockdown state, how can I unlock this state.

Thank you so much. I really appreciate it.

biweichen1989

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

SAS University Edition/VM has a modified path to use, try the following path instead:


libname sasintro 'folders/myfolders';

View solution in original post

15 REPLIES 15
Reeza
Super User

SAS University Edition/VM has a modified path to use, try the following path instead:


libname sasintro 'folders/myfolders';

biweichen1989
Calcite | Level 5

Thank you so much for your help Reeza! It is really helpful.

I am wondering if 'folders/myfolders' is the only path that I can permanently create a library on my MAC.

Thank you again. Much appreciate.

biweichen1989

Reeza
Super User

You can add other paths but need to set them up as shared folders, similar to how you set up my folders.

There's an FAQ on the SAS University Edition page that explains how to set up shared folders.

SAS University Edition Help Center

Check the section on

Working with Your Data and Results

sankeerth7
Calcite | Level 5

hi team,

 

Can you please help me out to create a libname in my sas working in mac ios

 

with the path myfolder/folder

 
i can see that i have created a library in the library in sas university edition . But how to access the physical location in my mac to copy my csv or excel files for analysis?
Cynthia_sas
SAS Super FREQ

Hi:

  Please review this screen shot. The folder illustrated is named PRG2, but it could be any name. Note how the "long" Macintosh physical path is showing the high level shared folder location as:

/Macintosh HD/Users/lee/Documents/SASUniversityEdition/myfolders

 

This is the location that was defined as shared in VirtualBox. You must, must, must set up shared folders in order to use SAS Studio. When you are working in SAS Studio, however, you do NOT refer to the Mac path name. The above shared folder location would simply be: 

/folders/myfolders

 

...where all of the Mac specific folder structure simply gets the alias "/folders" and the lower level folder that you make is referenced is "/myfolders", hence the location inside SAS Studio under which you write files will ALWAYS be /folders/myfolders.

 

  And, if you make subfolders as shown in the screen shot below:

/Macintosh HD/Users/lee/Documents/SASUniversityEdition/myfolders/coursedata

/Macintosh HD/Users/lee/Documents/SASUniversityEdition/myfolders/ECPMLR93

/Macintosh HD/Users/lee/Documents/SASUniversityEdition/myfolders/prg2

 

The the appropriate LIBNAME statements would be:

libname myclass '/folders/myfolders/coursedata';'

libname pmlr '/folders/myfolders/ECPMLR93';

libname orion '/folders/myfolders/prg2';

 

cynthia

 

folder_path_on_Mac_UE.png

lidney
Calcite | Level 5

 

Any advice on  how to do this with 'filename' instead of 'libname'? 

 

Kind regards

Cynthia_sas
SAS Super FREQ

Hi, The approach would be the same -- assuming you have the data in your shared folder location, let's say in Mac folder called:

/Macintosh HD/Users/lee/Documents/SASUniversityEdition/myfolders/mydata/somefile.csv

 

Then the FILENAME would be:

 

filename mycsv '/folders/myfolders/mydata/somefile.csv';

INFILE mycsv dlm=',';

 

or, if you have an ODS statement, then this (assuming you have a folder called myoutput in your shared folder location):

ODS PDF file='/folders/myfolders/myoutput/myreport.pdf';

** procedure code;

ODS PDF CLOSE;

 

  The reference really is simple, once you have your shared folder location defined.

 

cynthia

 

 

lidney
Calcite | Level 5

Hmm, I can't seem to create a 'shared folder'.  I've read the directions in the FAQ, but it's still not clear.  

 

1.  Do you create a 'shared folder' from within the SAS environment, or within the native enviroment (in my case OSX)?

 

2.  'MyFolders' doesn't seem to be a local file.  It doesn't show up when I search my machine?

 

3.  Am I supposed to click on one of the icons (presumably the one that looks like new folder)?   When I do, it doesn't allow me to put in a pathname / location, only within 'MyFolders'?

 

Thanks & regards

lidney
Calcite | Level 5

I really don't understand why this is so complicated.  I've got to go through this  convoluted process?  

 

Why can't I just provide SAS the pathname to the physical location which contains the data?  

 

After hours of goofing around with setting up a 'shared folders' in Vbox, I've yet to run a single program.   If there's clear step-by-step directions somewhere, feel free to point me there.

 

Regards

missgwolf
Calcite | Level 5

This is really nuts.  

 

I'm using the correct code.  It works if I do Proc Import, but not with the infile statement.  I'm looking at the file right in the browser.  Why won't this work with the infile statement??

 

Data BOLUS;
INFILE BOLUS 'folders/myfolders/MData/BOLUS.txt';

Cynthia_sas
SAS Super FREQ
Hi:
Typically, you need '/folders ....'
notice the / in front of the word 'folders' in the path and in all the previous posted examples.
cynthia
missgwolf
Calcite | Level 5
It turns out my issue was the incorrect code:

Data BOLUS;
INFILE BOLUS 'folders/myfolders/MData/BOLUS.txt';

I shouldn't have included BOLUS after the INFILE statement. The error code
told me that the file path was incorrect, instead of telling me that it was
looking for a path and saw an incorrect word. So, it sent me down quite
the rabbit hole... 🙂
Choriza
Calcite | Level 5

 Hi. I am using SAS Studio (I am gathering there are some slight differences between University Edition and Studio) - I am trying to create a new library and I am having the hardest time. I apologize if this is something super simple. I have spent days trying to figure it out. I am on a Mac OS X Yosemite. I can't figure out if I need to create a shared folder (if so, how do I do this?) or if I am somehow inputting the incorrect path name? I bought 'The Little Book of SAS' in the hopes that I could work through some things and get some practice. But, I am not able to import/create a library using of one of the sample data sets to accompany the book. Any help at all would be greatly appreciated. 

 

 

spacemonkeys
Calcite | Level 5
libname mylib 'folders/myfolders';

 

This gave me an error saying 

 

 NOTE: Library MYLIB does not exist.

However, when I did this:

 

libname mylib '/folders/myfolders';

I got this in response

NOTE: Libref MYLIB was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /folders/myfolders

However, I don't see any actual physical file on my computer

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 15 replies
  • 16626 views
  • 3 likes
  • 8 in conversation