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!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.