BookmarkSubscribeRSS Feed
emartinez204
Fluorite | Level 6
Hi,
I am using SAS Studio to transform a SAS file to a CSV file. I am using SAS® OnDemand for Academics . Here is my code:
 
proc export data=Mgmt635.salary_summary
            outfile=salary_summary
            dbms=csv replace ;
run;
%let _DATAOUT_MIME_TYPE=csv/text;
%let _DATAOUT_NAME=salary_summary.csv;
 
however when I run the program this is the error message I get when I run the program:  ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/SALARY_SUMMARY.
 
 
9 REPLIES 9
Kurt_Bremser
Super User

You need to use an absolute pathname for your file, starting at root (/). Otherwise, SAS will try to write the file in its current working directory, where you do not have write permission (as it is part of the SAS configuration tree).

Reeza
Super User
proc export data=Mgmt635.salary_summary
            outfile=salary_summary
            dbms=csv replace ;
run;

The portion in red above is incorrect, it should be the full file path to where you want to save the file and the extension as well.

 

proc export data=Mgmt635.salary_summary
            outfile='/home/reeza/demo/salary_summary.csv'
            dbms=csv replace ;
run;

@emartinez204 wrote:
Hi,
I am using SAS Studio to transform a SAS file to a CSV file. I am using SAS® OnDemand for Academics . Here is my code:
 
proc export data=Mgmt635.salary_summary
            outfile=salary_summary
            dbms=csv replace ;
run;
%let _DATAOUT_MIME_TYPE=csv/text;
%let _DATAOUT_NAME=salary_summary.csv;
 
however when I run the program this is the error message I get when I run the program:  ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/SALARY_SUMMARY.
 
 

 

emartinez204
Fluorite | Level 6

I am trying to download the file to my macbook download folders and change the code to this:

proc export data=Mgmt635.salary_summary
outfile='users/elenamartinez/downloads/salary_summary.csv'
dbms=csv replace ;
run;

%let _DATAOUT_MIME_TYPE=csv/text;
%let _DATAOUT_NAME=salary_summary.csv;

Now I get this error: ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/users/elenamartinez/downloads/salary_summary.csv. 

Tom
Super User Tom
Super User

@emartinez204 wrote:

I am trying to download the file to my macbook download folders and change the code to this:

proc export data=Mgmt635.salary_summary
outfile='users/elenamartinez/downloads/salary_summary.csv'
dbms=csv replace ;
run;

%let _DATAOUT_MIME_TYPE=csv/text;
%let _DATAOUT_NAME=salary_summary.csv;

Now I get this error: ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/users/elenamartinez/downloads/salary_summary.csv. 


So you still didn't start with the root directory,  / , so your path is still relative.  This is how to specify a filename 101. 

 

But I don't think SAS actually runs on a Macbook so how is it going to see the /user folder on your Macbook?

 

Where is SAS running?  You need to write to a directory that the SAS program can see.  You can then download to you Macbook, or use your Macbook to access it if your Macbook can also see that location,  for example if you wrote it to a shared network location.

 

How are you running SAS?  Are you using SAS/Studio interface?  Are you running the SAS university edition?  Running SAS on some Unix server?  Perhaps one located in "the cloud"?

emartinez204
Fluorite | Level 6

okay everyone! I got one of my classmates to help. She said to do this:

 

proc export data=mgmt635.salary_summary
outfile=_dataout
dbms=csv replace;
run;

%let _DATAOUT_MIME_TYPE=text/csv;
%let _DATAOUT_NAME=profit.csv;

 

Okay so outfile needs to be _dataout in order to be downloaded on computer.

Thank you for all who replied to me.

Reeza
Super User
Are you taking a course on stored processes? or reporting?
emartinez204
Fluorite | Level 6

Reporting I suppose. The class is Data Analysis. I am learning to generate graphs, queries, tables and derive meaning from them. This is my first time using a program like SAS.

Reeza
Super User
You first need to export the file to a CSV on SODA and then you can download the file. Your path is missing the starting slash (/) which is likely the issue now.

You cannot export to a folder directly on your computer. Your path should be

/home/emartinez204/salary_summary.csv

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

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.

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
  • 9 replies
  • 2905 views
  • 1 like
  • 4 in conversation