<?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: Create a new character variable! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145905#M261978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer! Is there any conventional method other than PUTN() ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2014 16:58:00 GMT</pubDate>
    <dc:creator>sukumark</dc:creator>
    <dc:date>2014-03-17T16:58:00Z</dc:date>
    <item>
      <title>Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145901#M261974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In below example, I would like to create a new character variable and with the attributes of second variable(FMTNAME)!! Resulting variable is RESULT_C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;RESULT_N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FMTNAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; best.&lt;/P&gt;&lt;P&gt; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z5.&lt;/P&gt;&lt;P&gt; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dollar5.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;RESULT_C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; 5&lt;/P&gt;&lt;P&gt; 00005&lt;/P&gt;&lt;P&gt; $5.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Sukumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 05:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145901#M261974</guid>
      <dc:creator>sukumark</dc:creator>
      <dc:date>2014-03-17T05:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145902#M261975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the PUTN() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result_C = PUTN (result_N, fmtname) ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 06:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145902#M261975</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-17T06:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145903#M261976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will probably also need a Length statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data want ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length result_C $ 5 ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result_C = PUTN (result_N, fmtname) ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keep result_C ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;(Untested)&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 06:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145903#M261976</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-17T06:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145904#M261977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to note RichardinOz, best. will return 8 characters but default so will be truncated by the $5.&amp;nbsp; Pop a strip() around the putn, or increase the with to $10. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 10:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145904#M261977</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-03-17T10:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145905#M261978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer! Is there any conventional method other than PUTN() ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 16:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145905#M261978</guid>
      <dc:creator>sukumark</dc:creator>
      <dc:date>2014-03-17T16:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new character variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145906#M261979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The PUT functions PUT(), PUTN(), and PUTC(), are the SAS conventional methods for recasting or recoding values.&amp;nbsp; PUTN() and PUTC() (for character values) allow the format to be provided dynamically, as you require in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="814511" data-username="RW9" href="https://communities.sas.com/people/RW9" id="jive-81451110471958460523711" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;RW9&lt;/A&gt;&lt;/STRONG&gt;'s amendment , or the use of the LEFT() function, is required if you use the modified version I supplied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 21:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-new-character-variable/m-p/145906#M261979</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-17T21:40:35Z</dc:date>
    </item>
  </channel>
</rss>

