title: SAS 9.3 passing a variable with spaces to a macro
body: <p>I need to pass a variable that contains spaces to a macro. And use this variable to make some logic and to buid a new column inside the macro.</p>
  
  <p>I've tried something like:</p>
  
  <pre><code>%MACRO func(var);
      if first.id then &amp;var = 0;
      retain &amp;var;
      if descr = %unquote(%str(%'&amp;var%')) then &amp;var = 1;
  %MEND;
  
  
  proc sort data=work.table5a;
      by id;
  run;
  
  data temp;
  set work.table5a;
  by id;
      %func(PLUTO)
      %func(PAPERINO)
      %func(BANDA BASSOTTI)
  if last.id;
  run;
  </code></pre>
  
  <p>ERROR is:</p>
  
  <p>NOTE: Line generated by the macro variable "VAR".
  37          BANDA BASSOTTI
              _____
              180
  ERROR 180-322: Statement is not valid or it is used out of proper order.</p>
  
  <p>If i comment %prova(BANDA BASSOTTI) it works. Any suggestions ?</p>
  
  <p>thanks</p>