<?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 colum in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70627#M20326</link>
    <description>Do you have country and dadbirthplacecountry in the wrong sides of the equals sign?  If all you are doing is renaming then proc datasets might be a better choice.</description>
    <pubDate>Fri, 27 May 2011 15:13:08 GMT</pubDate>
    <dc:creator>RickM</dc:creator>
    <dc:date>2011-05-27T15:13:08Z</dc:date>
    <item>
      <title>rename colum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70626#M20325</link>
      <description>Trying to rename a column titled country, I tried the code below but when it runs the column name is changed but the data is gone.  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data births.father (drop=country);&lt;BR /&gt;
	set births.father;&lt;BR /&gt;
	country=dadbirthplacecountry;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 27 May 2011 14:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70626#M20325</guid>
      <dc:creator>tjonas</dc:creator>
      <dc:date>2011-05-27T14:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: rename colum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70627#M20326</link>
      <description>Do you have country and dadbirthplacecountry in the wrong sides of the equals sign?  If all you are doing is renaming then proc datasets might be a better choice.</description>
      <pubDate>Fri, 27 May 2011 15:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70627#M20326</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-05-27T15:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: rename colum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70628#M20327</link>
      <description>thanks, that was it. I'm just learning sas.</description>
      <pubDate>Fri, 27 May 2011 15:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70628#M20327</guid>
      <dc:creator>tjonas</dc:creator>
      <dc:date>2011-05-27T15:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: rename colum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70629#M20328</link>
      <description>Hello Tjonas,&lt;BR /&gt;
&lt;BR /&gt;
Look at your code:&lt;BR /&gt;
&lt;BR /&gt;
country=dadbirthplacecountry;&lt;BR /&gt;
&lt;BR /&gt;
copies from dadbirthplacecountry to country. Then &lt;BR /&gt;
&lt;BR /&gt;
data births.father (drop=country);&lt;BR /&gt;
&lt;BR /&gt;
deletes country from output dataset. It means that if the input dataset birth.father does not contain dadbirthplacecountry then this column will be empty in the output dataset births.father. It looks like you neet the following:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data births.father;&lt;BR /&gt;
  set births.father;&lt;BR /&gt;
  rename country=dadbirthplacecountry;&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre] &lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Fri, 27 May 2011 15:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/rename-colum/m-p/70629#M20328</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-05-27T15:21:23Z</dc:date>
    </item>
  </channel>
</rss>

