Help using Base SAS procedures

Help using libname and filename - working on a Mac -- error

Reply
New Contributor
Posts: 3

Help using libname and filename - working on a Mac -- error

Hello,

I am a regular Stata user, so apologies in advance for the basic nature of these questions.  I am trying to download publicly available data from a researcher's website:  Files available in Indian district database

I am using the University edition of SAS.  The preamble of the code reads as follows:

/*********************************************************************/

title  'panel4: 1961-1991 Indian district sas file.' ;

/*********************************************************************/

/* Users will need to create their own libname and filename commands

   as appropriate for their local computer system

*/

libname  sasdata '.';

filename inpanel  pipe 'gunzip -c panel4.data.gz';

data sasdata.panel91;

attrib DLABEL length = $ 28;

infile INPANEL;

When I put in the relevant directory, the code is as follows: 

options linesize=132 pagesize=55 nocenter;

/*********************************************************************/

title  'panel4: 1961-1991 Indian district sas file.' ;

/*********************************************************************/

/* Users will need to create their own libname and filename commands

   as appropriate for their local computer system

*/

libname  sasdata '/Users/corinnestephenson/Documents/SASUniversityEdition/myfolders1';

filename inpanel  'panel4.data.gz';

However I get the following error: 

58 libname sasdata '/Users/corinnestephenson/Documents/SASUniversityEdition/myfolders1';

ERROR: The path /Users/corinnestephenson/Documents/SASUniversityEdition/myfolders1 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.

59 filename inpanel 'panel4.data';

60 

61 data sasdata.panel91;

Any recommendations would be very much appreciated!!!

Attachment
Attachment
Attachment
Super User
Posts: 17,829

Re: Help using libname and filename - working on a Mac -- error

New Contributor
Posts: 3

Re: Help using libname and filename - working on a Mac -- error

Hi Reeza,

Thanks for your message.  I just double checked -- yes, I set up a shared directory on my VM.  Is the lockdown state affecting anything? 

Super User
Posts: 17,829

Re: Help using libname and filename - working on a Mac -- error

No idea Smiley Sad

If you set up the shared directory with that specific path it should work.

You can contact the SAS help directly, they're fairly responsive.

New Contributor
Posts: 3

Re: Help using libname and filename - working on a Mac -- error

Will try that -- thanks for the suggestions!!

Ask a Question
Discussion stats
  • 4 replies
  • 572 views
  • 0 likes
  • 2 in conversation