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
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.