I have been trying to wrap my mind around why I can't get a proc export to work, and need someone to look over it to see where my error is. I followed a guideline that I have for another export, that is working wonderfully!!
The one that works:
proc export data= sasuser.WORK_QUERY_FOR_BANKCARD_0000
outfile= "G:\FolderName\foldername\SAS Reports\Report name\NO_XREF &now3..xlsx"
DBMS= Excel2010 label ;
run;
The mean one:
proc export data= sasuser.work_query_for_ret_scra_accts;
outfile= "G:\Folder Name\Report Deliverables\RET SCRA Accts &reptmo..xlsx"
DBMS= Excel2010 label ;
run;
This is what the log has for the error:
16 GOPTIONS ACCESSIBLE;
17 %let reptmo=%sysfunc(intnx(month,%sysfunc(today()),-1),AFRDFMY7.);
18
19 %put what is 1 &reptgmo;
what is 1 Feb2016
20
21 proc export data= sasuser.work_query_for_ret_scra_accts;
ERROR: FILE= or TABLE= is required and must be specified.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
I have to export out to my SASUSER first before writing the program that exports the report into Excel 2010 onto a shared drive ... what have I done wrong here?
I ultimately want to play with the scheduler ... another beast I am scared to play with, so that I can "set it and forget it" or at least not worry about it not getting run on a day off!
Any suggestions would be much appreciated!
Thanks in advance.
Is the ; at the end of this line actually there or an artifact of posting to this board?
proc export data= sasuser.work_query_for_ret_scra_accts;
If it is in the code then remove it. Compare it to the one that works and note that the first line does not have ; at the end.
Is the ; at the end of this line actually there or an artifact of posting to this board?
proc export data= sasuser.work_query_for_ret_scra_accts;
If it is in the code then remove it. Compare it to the one that works and note that the first line does not have ; at the end.
Thanks Ballardw, sometimes it's the little things that you just look over!
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.