<?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: Duplicate an existing String Column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347543#M273333</link>
    <description>&lt;P&gt;To assign the value to the newvar you need to reverse the order:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = oldvar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way you are doing it, using a variable that didn't exist before on the RIGHT side of = means that SAS created one to reference and since there wasn't any definition then the default is a numeric. And then without assigning a value it is initialized as missing.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2017 23:09:33 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-04-05T23:09:33Z</dc:date>
    <item>
      <title>Duplicate an existing String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347518#M273330</link>
      <description>&lt;P&gt;I am trying to duplicate a string column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;in a data step, I am using&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;oldvar=newvar&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but in the output table the newvar comes back as "."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a special option to duplicate the characters in a string variable?&lt;/P&gt;&lt;P&gt;I am on SAS EG 7.13&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 21:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347518#M273330</guid>
      <dc:creator>rgettys</dc:creator>
      <dc:date>2017-04-05T21:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate an existing String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347519#M273331</link>
      <description>&lt;P&gt;No, there is no extra step required. My guess is 'newvar' isn't actually new but is somehow defined in the dataset already as a numeric field. Ensure that the variable name is new or make sure the types match up when re-assigning data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 21:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347519#M273331</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-05T21:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate an existing String Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347543#M273333</link>
      <description>&lt;P&gt;To assign the value to the newvar you need to reverse the order:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = oldvar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way you are doing it, using a variable that didn't exist before on the RIGHT side of = means that SAS created one to reference and since there wasn't any definition then the default is a numeric. And then without assigning a value it is initialized as missing.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 23:09:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-an-existing-String-Column/m-p/347543#M273333</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-05T23:09:33Z</dc:date>
    </item>
  </channel>
</rss>

