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

I am getting an error exporting to csv from sas 9.4 using pc file server.

ERROR: Insufficient authorization to access /sas/lev1/config/Lev1/SASApp/

 

I know I have Insufficient authorization because I can export to the same location as an xlsx, both codes below.

 

I don't get how one code works and the other doesn't.

 

proc export data=work.flowresults

outfile="\\xxxxxxxxxxx_yyyyy.co.uk\xxxshare$\Service Delivery\test.csv"

dbms=csv replace ;

SERVER="aaa.zzz.corp";

SERVERUSER="xxx" ;

SERVERPASS="yyy";

run;

proc export data=work.flowresults

outfile="\\xxxxxxxxxxx_yyyyy.co.uk\xxxshare$\Service Delivery\test.xlsx"

dbms=excelcs replace ;

SERVER="aaa.zzz.corp";

SERVERUSER="xxx" ;

SERVERPASS="yyy";

run;

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

excelcs is a DBMS value that implies the use of a PC Files Server; csv OTOH will always write to a local file. Therefore you get syntax errors for the unexpected statements (server, serveruser,serverpass), which are also ignored.

The code then tries to write the local file to the current working directory of the SAS process, where you (rightfully) do not have write permission, as it lies in the SAS configuration tree.

 

The PC Files Server supports two file formats, MS Access and MS Excel.

 

For automatically writing to remote locations that can't be accessed via a network share, use filename ftp or filename sftp. With a network share, just use the mountpoint as the start of your path.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

excelcs is a DBMS value that implies the use of a PC Files Server; csv OTOH will always write to a local file. Therefore you get syntax errors for the unexpected statements (server, serveruser,serverpass), which are also ignored.

The code then tries to write the local file to the current working directory of the SAS process, where you (rightfully) do not have write permission, as it lies in the SAS configuration tree.

 

The PC Files Server supports two file formats, MS Access and MS Excel.

 

For automatically writing to remote locations that can't be accessed via a network share, use filename ftp or filename sftp. With a network share, just use the mountpoint as the start of your path.

nimmo_t
Calcite | Level 5

thanks, totally makes sense!

 

was doing my head in.

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