<?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: Renamed characters getting truncated in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494311#M130227</link>
    <description>&lt;P&gt;try&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token function"&gt;length&lt;/SPAN&gt; school_name &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;30&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;before set statement&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2018 20:19:04 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-09-10T20:19:04Z</dc:date>
    <item>
      <title>Renamed characters getting truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494309#M130226</link>
      <description>&lt;P&gt;Hi! I'm trying to rename some observations in my school_name variable. Currently, the school names look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="turnc.PNG" style="width: 166px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23169i19635ABFFE03C584/image-size/large?v=v2&amp;amp;px=999" role="button" title="turnc.PNG" alt="turnc.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to rename them to look like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 221px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23170i727D1A7EE4A66B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the data step, my code looks like this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length school_name $ 30;
	
if school_name = "Washington Elem" then School_Name = "Washington Elementary School";
if school_name = "Lin coln School" then School_Name = "Lincoln Elementary School";
if school_name = "Adams Elem" then School_Name = "Adams Elementary School";
if school_name = "Jackson" then School_Name = "Jackson Elementary School";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, after renaming, it looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 166px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23172i46C208E49E224385/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why do they get truncated? I added that line&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length school_name $ 30;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in the hopes of the names not being truncated, but it didn't change anything.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 20:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494309#M130226</guid>
      <dc:creator>mirmir</dc:creator>
      <dc:date>2018-09-10T20:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Renamed characters getting truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494311#M130227</link>
      <description>&lt;P&gt;try&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token function"&gt;length&lt;/SPAN&gt; school_name &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;30&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;before set statement&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 20:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494311#M130227</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-10T20:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Renamed characters getting truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494312#M130228</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input school_name= $16. ;
school_name=dequote(school_name);
cards;
school_name = "Washington Elem"
school_name = "Lin coln School"
school_name = "Adams Elem" 
school_name = "Jackson"
;
data want;
length school_name $ 30;
set have;
if school_name = "Washington Elem" then School_Name = "Washington Elementary School";
if school_name = "Lin coln School" then School_Name = "Lincoln Elementary School";
if school_name = "Adams Elem" then School_Name = "Adams Elementary School";
if school_name = "Jackson" then School_Name = "Jackson Elementary School";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 20:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Renamed-characters-getting-truncated/m-p/494312#M130228</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-10T20:27:33Z</dc:date>
    </item>
  </channel>
</rss>

