0
votes

I have the following macro:

%macro AgregateSummAll(SAll,SNatl);
proc sql;
    create table &SNatl as
    select 
      Month, 
      Processing, 
      InsuranceRng,
      sum(Transactions) as Transactions, 
      sum(TotalRev) as TotalRev format dollar16.2
    from &SAll
    group by 
      Month, 
      Processing, 
      InsuranceRng;
quit;
%mend; * AgregateSumAll;

Inside of the program I am using existing table SumAllReg, to go through macro but SAS does not see it. %AgregateSummAll(&SumAllReg,SumNatlReg);

Get the following error message:

&SumAllReg - 22 200 WARNING: Apparent symbolic reference SUMALLREG not resolved.

1
How did you define &sumallreg. It works fine in a test case for me.Reeza
Try adding a double && to pass table name into macro.Parfait
I agree with Reeza, it works for me too. I can't replicate your error. Try testing with %LET statement to predefine your macro variable. Could it be a scope issue?Vasilij Nevlev

1 Answers

0
votes

You write SumAllReg is a table, not a macro variable containing the name of a table, then why did you put the & in %AgregateSummAll(&SumAllReg,SumNatlReg);? Just pass the name of the table to your macro:

%AgregateSummAll(SumAllReg,SumNatlReg);