Desktop productivity for business analysts and programmers

SAS EG 5.1 multistep export for Excel 2010

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

SAS EG 5.1 multistep export for Excel 2010

[ Edited ]

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.


Accepted Solutions
Solution
‎03-22-2016 03:14 PM
Super User
Posts: 11,144

Re: SAS EG 5.1 multistep export for Excel 2010

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.

View solution in original post


All Replies
Solution
‎03-22-2016 03:14 PM
Super User
Posts: 11,144

Re: SAS EG 5.1 multistep export for Excel 2010

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.

Occasional Contributor
Posts: 10

Re: SAS EG 5.1 multistep export for Excel 2010

Thanks Ballardw, sometimes it's the little things that you just look over!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 465 views
  • 0 likes
  • 2 in conversation