BookmarkSubscribeRSS Feed
vkievsky
Fluorite | Level 6

When I am creating my own file under Window 7 with extension .sas, stating there :

libname learn '/tutorials/bookdata/learning_sas_by_example';

and load it into PrepGuide into Program space  I am getting error message below.

ERROR: User does not have appropriate authorization level for library LEARN.


At the same time when I am loading into  PrepGuide a UNIX file like

Learning_sas_by_example, chapter04examples.sas which contains the same statement "libname learn..."

I am not getting errors.

Vladimir Kievsky
vkievsky@hotmail.com

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  I suspect that you tried to WRITE to the LEARN library. So the problem isn't your LIBNAME statement. The problem is how you are USING the LIBNAME. See  example #2 in the screen shot. As long as you READ from the LEARN location (example #1, #3), you will be OK. But you do not have WRITE access to any of the data locations on the server. So if there is an example in the book that shows something like:

   

DATA LEARN.NEW;

** some code;

RUN;

   

Then you will have to change it to your user library or to the WORK library to test file creation:

  

DATA WORK.NEW;

** some code;

RUN;

  

  Here is some example code that I used for the attached screen shot. I can replicate your ERROR message just by trying to write to the LEARN library -- which fails because NOBODY has WRITE access to the OnDemand server except to your user folder. You will have to write to your user folder/directory (see Example #4). The tutorial on this web page explains how to use the OnDemand server with Book data.

(SAS OnDemand for Professionals Customer Support tab -- see videos)

  

Cynthia

 

libname learn '/tutorials/bookdata/learning_sas_by_example';

**1) reading FROM the LEARN library;

data test;

  set learn.bicycles;

run;

** 2) trying to write to the LEARN library;

** will generate an error;

data learn.new;

  set sashelp.class;

run;

** 3) again, reading FROM the LEARN library;

proc contents data=learn._all_;

run;

   
**4) write to user directory, called MYPLACE;
libname myplace '~/user';

data myplace.new;
  set learn.bicycles;
run;


cannot_write_to_server_tutorials_loc.pngcan_write_to_user_folder.png

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 2214 views
  • 0 likes
  • 2 in conversation