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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 845 views
  • 0 likes
  • 2 in conversation