<?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: modify the variable names within a limited list in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576201#M13027</link>
    <description>&lt;P&gt;I also tested this code version with success.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2019 15:19:59 GMT</pubDate>
    <dc:creator>PierreYvesILY</dc:creator>
    <dc:date>2019-07-24T15:19:59Z</dc:date>
    <item>
      <title>modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576152#M13015</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code to rename variables and add a suffix to all variable names of my dataset.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noprint&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* Variablen umbennennen */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cats(name,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'='&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,name,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_&amp;amp;Jahr11.'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;into&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; :list&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;separated by &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;' '&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; dictionary.columns&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; libname = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'WORK'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; memname = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"FICHIER_1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;datasets&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;library&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = work &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nolist&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;modify&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; fichier_1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;list;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;contents&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = work.fichier_1 ; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variables are correctly renamed,&amp;nbsp;however a few of them didn't need a rename.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I'm asking for help to:&lt;/P&gt;&lt;P&gt;option 1: modify the above code in order to exclude a limited list of variable names to be renamed&lt;/P&gt;&lt;P&gt;option 2: remove the suffix from the names of this limited list of variable names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can I do best?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576152#M13015</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-07-24T13:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576153#M13016</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281554"&gt;@PierreYvesILY&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The variables are correctly renamed,&amp;nbsp;however a few of them didn't need a rename.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please explain this part further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us your LOG (the entire log, not just the error messages) by copying the text of the log and pasting it into the window that appears when you click on the {i} icon. Do not paste the log directly into the reply window.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576153#M13016</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-24T13:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576159#M13018</link>
      <description>&lt;P&gt;hello Paige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code works, so there are no errors in the log. The log contains too many infos that cannot be displayed out of the company, I cannot send it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code renames ALL variables names, and I want to limit this: 6 different variables don't need to be renamed (I want to keep them as they are named). All of them are alphanumeric. On the contrary, ALL variables that need to be renamed are numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say, I have the following variables in the dataset: STUFE REGION AGENCY &lt;EM&gt;PRODUCTION RATE GROWTH ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;[ ALPHANUMERIC&lt;EM&gt; NUMERIC ] (the real number of numeric variables is high)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add a macrovariable _&amp;amp;Jahr11. to all numeric variable names, and obtain:&lt;/P&gt;&lt;P&gt;STUFE REGION AGENCY &lt;EM&gt;PRODUCTION_&amp;amp;Jahr11. RATE_&amp;amp;Jahr11. GROWTH_&amp;amp;Jahr11. ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope the context is clear now.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576159#M13018</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-07-24T13:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576160#M13019</link>
      <description>&lt;P&gt;Why not just tweek the WHERE clause?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where libname = 'WORK' and memname = "FICHIER_1"
  and upcase(name) not in ('VAR1','VAR2','VAR3')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576160#M13019</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-24T13:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576161#M13020</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;On the contrary, ALL variables that need to be renamed are numeric.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;from dictionary.columns
where libname = 'WORK' and memname = "FICHIER_1" and type='num';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For future reference, you can look inside the dictionary.columns data set to see what is in there in case you ever need to use other columns for some purpose; in the SAS Explorer window this dictionary.columns data set is called SASHELP.VCOLUMN.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 14:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576161#M13020</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-24T14:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576200#M13026</link>
      <description>&lt;P&gt;hi Paige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the version " and type = 'num' " and it worked perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot,&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;PY&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 15:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576200#M13026</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-07-24T15:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: modify the variable names within a limited list</title>
      <link>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576201#M13027</link>
      <description>&lt;P&gt;I also tested this code version with success.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 15:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/modify-the-variable-names-within-a-limited-list/m-p/576201#M13027</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2019-07-24T15:19:59Z</dc:date>
    </item>
  </channel>
</rss>

