Reputation: 3450
Back story: I'm trying to export files using SAS Enterprise Guide 5.1. I've done so successfully for quite a while. I have tons of SAS programs that run everyday without issues, but recently I've noticed SAS adding additional slashes (/) in file paths, and then claiming that the path is wrong. One of my SAS programs that has ran daily for months, without being edited at all, has developed this problem out of no where! Nothing changed in the code!
Here is the log from my latest export attempt that is having the same issue:
%PUT REPORTDATE = %sysfunc(intnx(day,%sysfunc(today()),-1),date7.);
REPORTDATE = 16AUG15
%LET FILE = filename_REPORTDATE..xlsx;
PROC EXPORT
DATA = finalData
OUTFILE = "filepath/&FILE"
DBMS = xlsx
REPLACE;
SHEET = "Sheet1";
RUN;
ERROR: Temporary file for XLSX file can not be created ->
/filepath//filename_REPORTDATE..$$1. Make sure the path name is correct
and that you have write permission.
So, the path isn't correct, and I don't have permission......because it doesn't exist with that extra /.
If any SAS wizards could shed some light on this, I'd appreciate it!
EDIT: 'filepath' is not a macro, I just removed the actual file path for privacy reasons. It is a written out path, "/foo/bar/&FILE"
Upvotes: 0
Views: 2826
Reputation: 3450
I have found the issue on both problems I had mentioned.
First, the main issue: SAS appears to be case sensitive with file paths. The actual folder had capital letters in the name. I was pointing SAS toward the same file path, but in lower case letters. I realize you could not have seen this given my question, but to protect privacy, I had to remove the actual file path.
Second: I mentioned a job that had been running for months and suddenly developed the same problem. The file path was solid, but the file it was producing on a regular basis had grown over time to be over 200MB. I tried exporting that same data that was going to xlsx to csv instead, and everything works.
I'm not sure if this is a well known 'thing' with SAS, being case sensitive with file paths, or not exporting to xlsx for larger files. (I would have swore I exported larger files in the past!). I would lean toward saying that, while this does appear to be user error, SAS's errors didn't seem to point me in the right direction of solving the problem.
Thanks for everyone's efforts, I do appreciate it!
Upvotes: 1