title: SAS: apparent symbolic reference not resolved
body: <p>I have a problem with unresolved variables in this part of a macro:</p>
  
  <pre><code>    %MACRO tukeyaddit(dataset=, factor1=, factor2=, response=);
  ods listing close;
  proc glm data=&amp;dataset;
    class &amp;factor1 &amp;factor2;
    model &amp;response = &amp;factor1 &amp;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='&amp;factor2' then call symput('ssa', ss);
    if hypothesistype=1 and source='&amp;factor1' then call symput('ssb', ss);
    if hypothesistype=1 and source='&amp;factor2' then call symput('dfa', df);
    if hypothesistype=1 and source='&amp;factor1' then call symput('dfb', df);
  run;
  </code></pre>
  
  <p>Specifically, the second data step shows the following error:</p>
  
  <pre><code> 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.
  </code></pre>
  
  <p>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.</p>