04-15-2016 08:35 AM
I am trying to export sas output to external csv file.
I am using the following lines:
proc export data=work.abcd_&today.
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!
04-15-2016 09:01 AM
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 D: within SAS reflect the D: drive you are looking at? Are you on a mainframe? Does the datset - which is used in the proc:
contain any observations? I don't know what that macro variable resolves as.
04-15-2016 09:34 AM
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.
04-15-2016 10:00 AM
Can you try it without the macro variables:
proc export data=work.abcd_20160415 outfile="D:\ABCD\abcd_20160415.csv" dbms=csv;
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.
04-15-2016 10:52 AM
04-15-2016 10:29 AM - edited 04-15-2016 10:31 AM
Is the SAS server a remote server or a local (on your desktop). If remote, the D: 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.
04-15-2016 01:42 PM
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.