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
SAS University Edition/VM has a modified path to use, try the following path instead:
libname sasintro 'folders/myfolders';
SAS University Edition/VM has a modified path to use, try the following path instead:
libname sasintro 'folders/myfolders';
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
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
hi team,
Can you please help me out to create a libname in my sas working in mac ios
with the path myfolder/folder
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
Any advice on how to do this with 'filename' instead of 'libname'?
Kind regards
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
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
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
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';
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.
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
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.