DATA Step, Macro, Functions and more

Macro call not executed

Reply
Regular Contributor
Posts: 157

Macro call not executed

I have a macro

 

%Rpt(flg)

 

ods tagsets.ExcelXP options(autofit_height="yes" sheet_name="&tab");

 

proc report data=&flg

......

 

run;

 

%Mend;

 

%Macro Out();

 

OPTIONS FORMCHAR="|----|+|---+=|-/\<>*" nobyline;
ods tagsets.excelxp file = "\\corp\test.xls" ;

%Rpt(test1);
%Rpt(test);

ods tagsets.Excelcp close;

 

%Mend;

 

%Out();

 

It's not showing an error but not creating the output.

 

Any error in the way i am calling?

PROC Star
Posts: 7,473

Re: Macro call not executed

You're not showing enough of your code. Does your macro start with:

 

%macro Rpt(flg);

 

If not, the SAS wouldn't know that it was supposed to be creating a macro.

 

Art, CEO, AnalystFinder.com

 

Regular Contributor
Posts: 157

Re: Macro call not executed

Hi Art,

 

It's weird I closed the session and ran the code again it worked

Ask a Question
Discussion stats
  • 2 replies
  • 137 views
  • 1 like
  • 2 in conversation