<?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 in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609242#M177366</link>
    <description>&lt;P&gt;I believe you should have a sas dataset with column A info, if yes, then you should try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Location;
set have;
        if columnA='Michiggan' then columnA = 'Michigan';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Dec 2019 03:16:40 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2019-12-04T03:16:40Z</dc:date>
    <item>
      <title>Rename in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609241#M177365</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like shown in the screenshot, Michigan is misspelled as Michiigan and I'm suppose to fix the error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-12-03 at 9.52.00 PM.png" style="width: 262px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34423i7DE35B0DCE4EE707/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-03 at 9.52.00 PM.png" alt="Screen Shot 2019-12-03 at 9.52.00 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is what I have:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Location;
        rename Michiggan = Michigan;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone tell me what I did wrong please? Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 02:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609241#M177365</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2019-12-04T02:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rename in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609242#M177366</link>
      <description>&lt;P&gt;I believe you should have a sas dataset with column A info, if yes, then you should try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Location;
set have;
        if columnA='Michiggan' then columnA = 'Michigan';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Dec 2019 03:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609242#M177366</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-12-04T03:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rename in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609244#M177367</link>
      <description>&lt;P&gt;Hi there try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
location='Michiggan, MI';
output;
location='Ohio, OH';
output;
run;

data want;
set have;
if scan(location,1,',','it')='Michiggan' then location='Michigan, MI';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 03:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609244#M177367</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-12-04T03:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rename in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609250#M177368</link>
      <description>&lt;P&gt;Thank you. It worked.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 03:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609250#M177368</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2019-12-04T03:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rename in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609481#M177456</link>
      <description>&lt;P&gt;RENAME is used to change the Name of a variable, the values of a variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: if you are going to work with address type date, city and state as shown, you should have a separate column for the City and separate for the State. Best is to accomplish this as the data is brought into SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your data has a ZIP code value you might want to investigate the ZIPCITY function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
    zip=49861;
    city = zipcity(zip);
run;&lt;/PRE&gt;
&lt;P&gt;Which returns "Michigamme, MI"&lt;/P&gt;
&lt;P&gt;So you may also want to check what the actual correct value is supposed to be. Is that supposed to be the STATE name in long form (in which case your Atlanta, GA is questionable) or the name of a city in the state (I don't find a city named Michigan though there is a Michigan Center&amp;nbsp; ZIP=49254).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 18:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rename-in-SAS/m-p/609481#M177456</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-04T18:44:02Z</dc:date>
    </item>
  </channel>
</rss>

