07-20-2016 03:18 PM
We run a lot of projects using SAS enterprise guide and export the results in excel using enterprise guide export to excel option (SAS runs in Unix, enterprise guide in windows, file exports in Windows).
When exporting, SAS appends the file name with _verXXXXX e.g. "testfile_ver20140328081702.xls" (do not overwrite option checked).
Is there anyway to turn this _ver with just e.g "testfile_20140328.xls"? so everytime we export a file, this new file would end up with this DDMMYYYY format even it means to overwrite previously created files.
Thanks for your help.
07-20-2016 05:16 PM
SAS doesn't do that by default AFAIK, though it's possible. Do you have code or a custom task your using?
07-20-2016 07:47 PM
I know what @arunmmw is talking about, @Reeza. It's a feature in EG that allows you to export an Excel file. EG writes the Excel file -- not SAS -- in this case. And the "don't overwrite" option causes EG to append a datetime stamp to generate a unique name.
I'm going to assume that you don't have SAS/ACCESS to PC Files available to use PROC EXPORT to XLSX. But if you have the latest version of SAS 9.4, you could use ODS EXCEL to create the Excel file on Unix directly (no SAS/ACCESS needed). You can use SAS code to name the file based on the date. And if you need the file to end up on Windows, you can download using the Copy Files task. I have the makings of an example in this blog post.
07-21-2016 12:39 PM
Thanks @Reeza@ChrisHemedinger. Chris, I could create excel files and move them to my unix drive, downloading them into Windows is our challenge. We use enterprise guide excel export option to export files to the required drive for our users to open them directly.
Your copy file task is a good solution (probably the only solution) i found. Does your copy file task work with shared drives (not mapped) as well?