I have a problem with unresolved variables in this part of a macro:
%MACRO tukeyaddit(dataset=, factor1=, factor2=, response=);
ods listing close;
proc glm data=&dataset;
class &factor1 &factor2;
model &response = &factor1 &factor2;
ods output overallanova=overall modelanova=model;
run;
quit;
ods listing;
ods output close;
data _null_;
set overall;
if source='Corrected Total' then call symput('overall', ss);
run;
data _null_;
set model ;
if hypothesistype=1 and source='&factor2' then call symput('ssa', ss);
if hypothesistype=1 and source='&factor1' then call symput('ssb', ss);
if hypothesistype=1 and source='&factor2' then call symput('dfa', df);
if hypothesistype=1 and source='&factor1' then call symput('dfb', df);
run;
Specifically, the second data step shows the following error:
WARNING: Apparent symbolic reference SSA not resolved.
WARNING: Apparent symbolic reference SSB not resolved.
WARNING: Apparent symbolic reference DFA not resolved.
WARNING: Apparent symbolic reference DFB not resolved.
I can't figure out what I'm doing wrong. In particular, I don't understand why the variable in the first data step resolves, but the ones in the second data step don't. Any help would be much appreciated.