<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Batch variable renaming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156667#M30596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both methods work great! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Nov 2013 18:42:43 GMT</pubDate>
    <dc:creator>cypher85</dc:creator>
    <dc:date>2013-11-27T18:42:43Z</dc:date>
    <item>
      <title>Batch variable renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156664#M30593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question. I need to rename all of the variables in a sas dataset. I have another sas dataset that has 2 columns, the variable names, and what the variable names need to be renamed to. Is there a way for me to batch rename the variables in the one dataset based on the information contained in the other dataset, without doing it manually? Also, they are completely different names, it isn't simply adding a prefix or suffix. For example, I need to rename "_76532x2x26" to "HaveSurgery".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 20:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156664#M30593</guid>
      <dc:creator>cypher85</dc:creator>
      <dc:date>2013-11-26T20:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Batch variable renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156665#M30594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple way (if the list is small enough) is to generate a macro variable with pairs from the RENAME table.&lt;/P&gt;&lt;P&gt;Then you can use the list in a RENAME statement in a data step or PROC DATASETS step or even in RENAME= dataset option.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt; select catx('=',oldname,newname) into :renames separated by ' ' from RENAME ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rename &amp;amp;renames;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 21:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156665#M30594</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-11-26T21:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Batch variable renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156666#M30595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Executing even faster is probably&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;select catx('=',oldname,newname) into :renames separated by ' ' from RENAME ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc datasets nolist library=work;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify datasetname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rename &amp;amp;renames;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 14:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156666#M30595</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-11-27T14:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch variable renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156667#M30596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both methods work great! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 18:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Batch-variable-renaming/m-p/156667#M30596</guid>
      <dc:creator>cypher85</dc:creator>
      <dc:date>2013-11-27T18:42:43Z</dc:date>
    </item>
  </channel>
</rss>

