Help using Base SAS procedures

Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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


Accepted Solutions
Solution
‎01-03-2015 09:22 AM
Super User
Posts: 17,796

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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


libname sasintro 'folders/myfolders';

View solution in original post


All Replies
Solution
‎01-03-2015 09:22 AM
Super User
Posts: 17,796

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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


libname sasintro 'folders/myfolders';

New Contributor
Posts: 2

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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

Super User
Posts: 17,796

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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

Learner
Posts: 1

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

[ Edited ]

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?
SAS Super FREQ
Posts: 8,743

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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

New Contributor
Posts: 4

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

 

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

 

Kind regards

SAS Super FREQ
Posts: 8,743

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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

 

 

New Contributor
Posts: 4

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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

New Contributor
Posts: 4

Re: Help using libname - working SAS Studio on a Mac OS X Yosemite 10.10.1-- error, lockdown

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 topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 3031 views
  • 0 likes
  • 5 in conversation