title: sas macro string-comparison does not equate in the same way
body: <p>This macro string-comparison works in misterious ways for me. The obvious to me would be that the result of <code>%test1(intotest)</code> and <code>%test2(intotest)</code> are equal.</p>
  
  <pre><code>%macro test1(intotest=);
      %str(&amp;intotest) = %str("b");
  %mend;
  
  %macro test2(intotest);
      %if %str(&amp;intotest) = %str("b") %then
          1;
      %else 0;
  %mend EAF;
  
  data datatable;
      fromtable = 'b';
      test1 = %test1(intotest=fromtable);
      test2 = %test2(intotest=fromtable);
  run;
  </code></pre>
  
  <p>The output is
  <a href="http://i.stack.imgur.com/TCzR1.png" rel="nofollow">fromtable=b,test1=1,test2=0</a></p>
  
  <p>How would I rewrite <code>%test2()</code> so that it gives the same result as <code>%test1()</code> and still use the information in the datatable as input?</p>