BookmarkSubscribeRSS Feed
ncsthbell
Quartz | Level 8

I am attemping to read a sas table and write the output to a .csv file on windows server.  Seems pretty easy... but I can't get it to work.  I am getting error 'insufficient priveleges', however, I looks like the statement has put a sasbase library in fron of the windows location to put my exported file.  I don't understand why it is looking at sasbase when I am directing it in the export opens to the windows path.  Of course, this is needed within an hour!  I have never done an export like this. Can anyone offer any suggestionsj

.

Here is my code:

PROC SQL;

/* Development */

   CREATE TABLE WORK.Sales_Extract AS

   SELECT *

     FROM SALES.SALES_TABLE;

QUIT;

 

PROC EXPORT DATA=WORK.Sales_Extract

           OUTFILE='c:\Data\Extracts\SalesExtract.csv'

           dbms=csv;

           DELIMITER=',';

           PUTNAMES=yes;

RUN;

 

ERROR: Insufficient authorization to access /sasbase/SAS9.2/config/Lev1/SASApp/c:\Data\Extracts\SalesExtract.csv.

2 REPLIES 2
ballardw
Super User

Large economy size hint: Compare the place you tried to write and the location referenced in the error message. The combination of / and \ tells me that you are likely running with SAS running on a Unix server and you don't have permissions to write to the disks on the server.

 

You may need to talk to your SAS admin about how to direct output back to your PC instead of to locations on the server.

Reeza
Super User
Your data is on the server, not on your C drive. You can export it to the server and then FTP it off. Are you using Base SAS?
If so you may be able to use the following to get it to your local drive:

libname rmtwork slibref=work server=YOURSERVER;

Then do a proc export with: RMTWORK instead of WORK.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 767 views
  • 0 likes
  • 3 in conversation