title: Rename nonsequential variable names to sequential names in sas
body: <p>I am working with survey data where the variable names in our database are descriptive, and not sequentially numbered. They are sequential in the database (moving from left to right).  I would like to work in my programs with numbered variables, and I have been unsuccessful in trying to rename them programmatically without having to write out <em>every</em> change by hand (there are 87 total variables).</p>
  
  <p>I have tried to use <code>array</code>, but that has not worked since they are not named sequentially nor do they have a common structure (no common prefix or suffix).   </p>
  
  <p>Example data is below:</p>
  
  <hr>
  
  <pre><code>data svy;
    input id relationship outburst checkwork goodideas ;
  cards;
  101 3 4 5 6
  102 4 5 6 6
  103 1 1 8 1
  104 2 3 2 4
  ;
  run;
  
  *****  does not work  ;
  data svy_1; set svy;
  rename relationship--goodideas = var01--var04;
  run;
  quit;
  </code></pre>
  
  <hr>
  
  <p>The above code returns the following error in the log:</p>
  
  <pre><code>ERROR: Missing numeric suffix on a numbered variable list (relationship-goodideas).
  </code></pre>
  
  <p>I would like to rename the variables to something like: var01, var02, etc...</p>
  
  <p>Any help is greatly appreciated.</p>