DATA Step, Macro, Functions and more

proc export error message

Reply
Frequent Contributor
Posts: 131

proc export error message

I am attempting to perform a proc export on 4 datasets  Sas is generating an syntax error based on the outfile.  I am not sure what is wrong wit the syntax here.

Macro Export (Dataset,Sheetname);

proc export data=&Dataset.

             outfile=&Outfile.

            dbms=EXCELCS replace;

                sheet=&Sheetname.;

            server='XX22544';

run;

%Mend;

%Export (Summary_Yr_Total,"Yr_Total");

%Export (Summary_Yr_Risk_Port,"Yr_Risk_Port");

%Export (Summary_Inv_DQ,"Inv_DQ");

%Export (Actives_Curr_Yr_Pl_5_Yrs,"Loan List");

SYMBOLGEN:  Macro variable DATASET resolves to Summary_Yr_Total

NOTE 137-205: Line generated by the invoked macro "EXPORT".

3741     proc export data=&Dataset.              outfile=&Outfile.             dbms=EXCELCS replace;    sheet=&Sheetname.;             server='GA016A744'; run;

                                                         -

                                                         22

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string. 

Super User
Super User
Posts: 6,499

Re: proc export error message

You are referencing the macro variable OUTFILE but it is not defined anywhere in the code you posted.

Ask a Question
Discussion stats
  • 1 reply
  • 270 views
  • 0 likes
  • 2 in conversation