<?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: Renaming and Removing Variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573528#M161970</link>
    <description>&lt;P&gt;can you walk me through how to run proc contents?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2019 14:51:59 GMT</pubDate>
    <dc:creator>NickA1</dc:creator>
    <dc:date>2019-07-15T14:51:59Z</dc:date>
    <item>
      <title>Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573543#M161943</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;I am trying to rename a&amp;nbsp;column&amp;nbsp;after transposing my data, but it wont let me... I keep getting a reference error...anyone know what I'm doing wrong? I ran proc contents and it looks like the variable name Is correct&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; YieldsRenamed2 (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(_label_=cusip));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Yieldstransposed;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573543#M161943</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573518#M161967</link>
      <description>&lt;P&gt;Looking to rename a variable and remove a column but I keep getting an error that says the variable has not been reference...here is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; YieldsRenamed (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= (label_of_former_variable=cusip));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Yieldstransposed;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;this wont rename it and where should I add in the remove argument?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573518#M161967</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573522#M161968</link>
      <description>&lt;P&gt;Seems as if you are using the LABEL of a variable instead of the NAME of the variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= (label_of_former_variable=cusip))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to run PROC CONTENTS on this data set Yieldstransposed so you can see the actual name of the variable.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573522#M161968</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-15T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573526#M161969</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281094"&gt;@NickA1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Looking to rename a variable and remove a column but I keep getting an error that says the variable has not been reference...here is my code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; YieldsRenamed (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= (label_of_former_variable=cusip));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Yieldstransposed;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;this wont rename it and where should I add in the remove argument?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DROP on either input set or output set as dataset option or a DROP statement in the body of the data step code to "remove" a variable. One way:&lt;/P&gt;
&lt;PRE&gt;data YieldsRenamed (rename= (name_of_variable_to_rename=cusip));
   set Yieldstransposed (drop=name_of_variable_to_drop);
run;&lt;/PRE&gt;
&lt;P&gt;When to drop depends of when you want to use it. if you need it in the data step then either the drop statement or data set option on the output set. Otherwise it is a style choice.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573526#M161969</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-15T14:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573528#M161970</link>
      <description>&lt;P&gt;can you walk me through how to run proc contents?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573528#M161970</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T14:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573530#M161971</link>
      <description>proc contents data=sashelp.class;run;&lt;BR /&gt;&lt;BR /&gt;In the documentation for each procedure, there's an examples section that includes code that shows you how to use the procedure.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n1a5k5u51pvnlhn17j9v82nciokh.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n1a5k5u51pvnlhn17j9v82nciokh.htm&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573530#M161971</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-15T14:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573531#M161972</link>
      <description>&lt;P&gt;the variable is called "_label_" but this still didn't work when I tried to rename it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; YieldsRenamed2 (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(_label_=cusip));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Yieldstransposed;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 14:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573531#M161972</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T14:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573552#M161946</link>
      <description>&lt;P&gt;Show the lines of text from the SAS log. Make sure to use the Insert Code icon (looks like {i} on the menu bar) so that formatting is not lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two possible errors from the RENAME= option in your code.&lt;/P&gt;
&lt;P&gt;1) The variable _LABEL_ does not exist on the input dataset.&amp;nbsp; If none of the variables being transformed had labels attached then PROC TRANSPOSE will NOT create the _LABEL_ variable.&amp;nbsp; You could eliminate the error by adding the variable into this step.&lt;/P&gt;
&lt;P&gt;Of course then CUSIP is will not be very useful.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data YieldsRenamed2 (rename=(_label_=cusip));
  set Yieldstransposed;
  retain _label_ 'no label defined';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) The variable CUSIP is already on the dataset so you cannot rename some other variable to that name.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573552#M161946</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-15T15:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573554#M161947</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;49
50     data YieldsRenamed1 (rename=(_LABEL_=cusip));
51     set Yieldstransposed;
52     run;

NOTE: There were 138390 observations read from the data set WORK.YIELDSTRANSPOSED.
NOTE: The data set WORK.YIELDSRENAMED1 has 138390 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.11 seconds
      cpu time            0.07 seconds

&lt;/PRE&gt;&lt;P&gt;here&amp;nbsp;is the code from the log&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573554#M161947</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T15:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573556#M161948</link>
      <description>&lt;P&gt;No error there.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573556#M161948</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-15T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573557#M161949</link>
      <description>&lt;P&gt;but it&amp;nbsp; didn't rename my variable...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573557#M161949</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T15:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573559#M161973</link>
      <description>Does your original data set already contain a variable named CUSIP?  That would prevent renaming another variable to CUSIP.</description>
      <pubDate>Mon, 15 Jul 2019 15:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573559#M161973</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-07-15T15:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573561#M161974</link>
      <description>&lt;P&gt;no but another data set has a variable named cusip. I want to merge these two variables. is it possible to do it without making them the same name?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573561#M161974</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T15:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573562#M161952</link>
      <description>&lt;P&gt;Show the PROC CONTENTS of the NEW dataset.&lt;/P&gt;
&lt;P&gt;Perhaps you are looking at the LABEL of the renamed variable instead of its NAME?&amp;nbsp; WHy not also change the label while you are at it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I feel that frequently it is much clearer if you use the actual RENAME statement instead of the RENAME= dataset option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  rename _label_=CUSIP;
  label _label_='CUSIP generated from _LABEL_';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 15:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573562#M161952</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-15T15:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573571#M161975</link>
      <description>&lt;PRE&gt;data YieldsRenamed (rename= (label_of_former_variable=cusip));

set Yieldstransposed;

run;&lt;/PRE&gt;
&lt;P&gt;You are renaming in Output Data set. Do you want to RENAME&amp;nbsp;label_of_former_variable in the Input Data set,&amp;nbsp;Yieldstransposed ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 16:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573571#M161975</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2019-07-15T16:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573572#M161976</link>
      <description>yes, exactly</description>
      <pubDate>Mon, 15 Jul 2019 16:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573572#M161976</guid>
      <dc:creator>NickA1</dc:creator>
      <dc:date>2019-07-15T16:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573576#M161977</link>
      <description>&lt;PRE&gt;data YieldsRenamed;

set Yieldstransposed;
rename label_of_former_variable=cusip;

run;&lt;/PRE&gt;
&lt;P&gt;Use rename this way in input data set.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 16:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573576#M161977</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2019-07-15T16:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573582#M161978</link>
      <description>Did you check the YieldsREnamed data set for the renamed variable? Can you show a proc contents on that data set after you run the code above and include the log?</description>
      <pubDate>Mon, 15 Jul 2019 16:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573582#M161978</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-15T16:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573590#M161979</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281094"&gt;@NickA1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;I am trying to rename a&amp;nbsp;column&amp;nbsp;after transposing my data, but it wont let me... I keep getting a reference error...anyone know what I'm doing wrong? I ran proc contents and it looks like the variable name Is correct&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; YieldsRenamed2 (&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(_label_=cusip));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Yieldstransposed;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please don't post the same question twice, I've merged them for now.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is likely happening is that you're seeing the variable label, not the variable name in your proc print, you've specified label. Renaming a variable does not change it's label, so you need to change it manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data YieldsRenamed2 (rename=(_label_=cusip));

set Yieldstransposed;

label _label_ = "CUSIP";

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is also a likely easier fix, on the PROC TRANSPOSE output you can rename the variable right in that step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 16:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573590#M161979</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-15T16:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming and Removing Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573592#M161981</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17813"&gt;@KachiM&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;data YieldsRenamed (rename= (label_of_former_variable=cusip));

set Yieldstransposed;

run;&lt;/PRE&gt;
&lt;P&gt;You are renaming in Output Data set. Do you want to RENAME&amp;nbsp;label_of_former_variable in the Input Data set,&amp;nbsp;Yieldstransposed ?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I really doubt if you have a variable named LABEL_OF_FORMER_VARIABLE.&amp;nbsp; You might have a variable named _LABEL_ that has a label of 'LABEL OF FORMER VARIABLE'.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 16:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renaming-Variables/m-p/573592#M161981</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-15T16:40:50Z</dc:date>
    </item>
  </channel>
</rss>

