title: SAS macro variable issue- 'File Name value exceeds maximum length'
body: <p>I'm trying to leverage macro variables (assigned via %LET) for PROC IMPORTS but it's causing the file name to exceed 201 characters.
  (ERROR: File Name value exceeds maximum length of 201 characters)</p>
  
  <p>Is there a different way to define variables so that they are passed as values instead of functions?</p>
  
  <p>My old datafile string ends 
      DATAFILE="...Files_Submitted\201612\Reconcile\Q42016 Principal balances.xls" </p>
  
  <p>I have changed it to 
      DATAFILE="...Files_Submitted\&amp;yrmm.\Reconcile\&amp;quarter. Principal balances.xls" </p>
  
  <p>Using the following variables.</p>
  
  <pre><code>%LET EOLM= INTNX('MONTH',today(),-&amp;MonthsAgo.);
  %LET yrmm= COMPRESS(year(&amp;EOLM.)||PUT(month(&amp;EOLM.),z2.));
  %LET qtr = COMPRESS(year(&amp;EOLM.)||COMPRESS('Q'||CEIL(month(&amp;EOLM.)/3)));
  </code></pre>
  
  <p>Thanks in advance for any/all assistance. </p>