BookmarkSubscribeRSS Feed
alexandravieira
Fluorite | Level 6

Hi, I'm doing a simple proc export:

FILENAME REFFILE FILESRVC FOLDERPATH="&exp_path" FILENAME='cars.csv';
proc export data=sashelp.cars outfile=REFFILE dbms=csv replace; run;
FILENAME REFFILE clear;

&exp_path exists.

First time I run it, it runs fine and the csv is created correctly. Second time I run it, I get the error: "ERROR: File denoted by URI '/files/files/c36d64c8-4d60-416c-833e-7633a138bf8e' was not found" and it corrupts the file cars.csv.

If I take out the replace option, it runs fine, it just says that it won't replace the file because I didn't specify the replace option.

What am I doing wrong? I'm on SAS Viya 3.5

 

Thanks in advance

Alex

1 REPLY 1
BrunoMueller
SAS Super FREQ

I ran this code on SAS Viya 3.5, it works every time, in the log one can see, that there is always a new file uri shown.

 

filename reffile filesrvc folderpath="&exp_path" filename='cars.csv';

proc export
  data=sashelp.cars
  outfile=REFFILE
  dbms=csv
  replace
;
run;

What are your permissions on the folder you write the file too? You can view those using the applications menu -> Environment Manager -> Content and then use the RightMouseButton to view the Authorization on the folder in question.

 

Maybe it is best to contact Technical Support on this error.

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!

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