Hello everyone,
I am trying to export sas output to external csv file.
I am using the following lines:
proc export data=work.abcd_&today.
outfile="D:\ABCD\abcd_&today..csv"
dbms=csv;
run;
The log says:
NOTE: "D:\ABCD\abcd_20160415.csv" file was successfully created.
But there is no file generated in the predefined path.
What could be the problem and am I missing something?
Thanks in advance!
What software are you running, is it SAS Universtiy Edition, Enterprise Guide etc. Do you have write access to D:? Does the drive mapped to 😧 within SAS reflect the 😧 drive you are looking at? Are you on a mainframe? Does the datset - which is used in the proc:
work.abcd_&today.
contain any observations? I don't know what that macro variable resolves as.
Thanks for the fast reply.
It is Enterprise Guide 4.3.I have a write access to D.The macro variable is returning the sysdate in yyyymmdd format.
The table has observations in it. I am using corporate computer.
About the mapping between D:\s I am not sure and I do not know how to check it...
Actually when I am exporting the table with the Export wizard, as a step in the process flow, everything works perfect.
Can you try it without the macro variables:
proc export data=work.abcd_20160415 outfile="D:\ABCD\abcd_20160415.csv" dbms=csv;
run;
It shouldn't make any difference, but if its working through menu export options I don;t see why it wouldn't. Have you tried - I think its the last option on the export wizard - to save the code generated by the export wizard - you have two buttons to the lower right, one is finish the other is next and you can save the code. Copy that code and run it in your project.
Dzhu,
Is the SAS server a remote server or a local (on your desktop). If remote, the 😧 drive there may be different from the one that you can see with Windows Explorer.
The export wizard operates within EGuide, but the PROCs excute within the server.
You probably can't. Typically, corporate servers are set up to see shared network drives, but not drives on desktops or laptops. Your IT support group may be able to configure it for you if you can make a sufficient business case to them.
Thanks for the reply.
I will try to be as convincing as possible 🙂
Hope it will work.
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!
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.