<?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: Rename all variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Re-Rename-all-variables/m-p/575483#M162809</link>
    <description>&lt;P&gt;Because your query will never match any variables. The LIBNAME and MEMNAME variables in that view are always in uppercase.&lt;/P&gt;
&lt;P&gt;If you want to remove the first and last character you need to know the length.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;catx('=',name,substr(name,2,length(name)-2))&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Jul 2019 17:25:52 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-07-22T17:25:52Z</dc:date>
    <item>
      <title>Re: Rename all variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Rename-all-variables/m-p/575465#M162808</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to rename all my variables by cutting the first and the last letters.&lt;/P&gt;&lt;P&gt;I used this code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data mine.petitVEST2;&lt;BR /&gt;set mine.petitTEST1;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;select cats(name ||'='|| substr(name,2,4)) into: rename_list separated by " "&lt;BR /&gt;from dictionary.columns&lt;BR /&gt;where libname="mine" and memname="petitVEST2";&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc datasets library = mine nolist;&lt;BR /&gt;modify petitVEST2;&lt;BR /&gt;rename &amp;amp;rename_list;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc contents data = mine.petitVEST2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I received this error message :&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;79 proc datasets library = mine nolist;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80 modify petitVEST2;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Apparent symbolic reference RENAME_LIST not resolved.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 rename &amp;amp;rename_list.;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;76&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Enter RUN; to continue or QUIT; to end the procedure.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Expecting un nom.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;Please help me!&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;Anna&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Jul 2019 17:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Rename-all-variables/m-p/575465#M162808</guid>
      <dc:creator>annaba</dc:creator>
      <dc:date>2019-07-22T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rename all variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Rename-all-variables/m-p/575483#M162809</link>
      <description>&lt;P&gt;Because your query will never match any variables. The LIBNAME and MEMNAME variables in that view are always in uppercase.&lt;/P&gt;
&lt;P&gt;If you want to remove the first and last character you need to know the length.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;catx('=',name,substr(name,2,length(name)-2))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 17:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Rename-all-variables/m-p/575483#M162809</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-22T17:25:52Z</dc:date>
    </item>
  </channel>
</rss>

