BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fuka-japan
Calcite | Level 5

Hello, this is Fuka-japan.

I need to convert the SAS file attached to this post to a csv file for use with R, but it says "You do not have permissions".

What should I do?

 

my code:

PROC EXPORT DATA= DEF.sas
OUTFILE= "/home/u59515621/元データ"
DBMS=CSV REPLACE;
RUN;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User
  1. Never use special characters in path and file names, only use the 26 letters (upper and lower case), digits and underlines.
  2. .sas files are program files, containing plain text, which can be opened with any text editor without exporting.
  3. PROC EXPORT is used for exporting data from datasets or views, not for programs. Your PROC EXPORT would search for a dataset called SAS in library DEF.

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User
  1. Never use special characters in path and file names, only use the 26 letters (upper and lower case), digits and underlines.
  2. .sas files are program files, containing plain text, which can be opened with any text editor without exporting.
  3. PROC EXPORT is used for exporting data from datasets or views, not for programs. Your PROC EXPORT would search for a dataset called SAS in library DEF.
Patrick
Opal | Level 21

You can convert a SAS table (data) to a .csv using Proc Export. 

What you're trying to use is a SAS program with Proc Export. That simply doesn't make any sense and just can't work.

Ksharp
Super User
You need to specify a LIBNAME for that sas dataset and ".CSV" for csv filename:

libname X "/home/u59515621/"
PROC EXPORT DATA= X.DEF
OUTFILE= "/home/u59515621/元データ.CSV"
DBMS=CSV REPLACE;
RUN;

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 4990 views
  • 0 likes
  • 4 in conversation