<?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: How to convert large amount of numeric variables to character variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205681#M306391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jag,&lt;/P&gt;&lt;P&gt;It doesn't work with best32. format.&lt;/P&gt;&lt;P&gt;Char1-char800 is empty after apply best32. format in put function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I don't know how to attach file in reply. I can send the sample data to your email if you don't mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jun 2015 12:26:32 GMT</pubDate>
    <dc:creator>Noleen</dc:creator>
    <dc:date>2015-06-15T12:26:32Z</dc:date>
    <item>
      <title>How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205676#M306386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have around 800 numeric variables and want to convert them into character variables. If using PUT function, I have to convert them one by one. &lt;/P&gt;&lt;P&gt;Is there any other way to do it? As using PUT 800 times is not very doable &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;Many thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2015 05:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205676#M306386</guid>
      <dc:creator>Noleen</dc:creator>
      <dc:date>2015-06-14T05:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205677#M306387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you have not provided dummy data, here is what i am expecting which you can try . I used arrays &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array nums(*) num1-num800;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array chars(*) $ char1-char800;&lt;/P&gt;&lt;P&gt;do i = 1 to dim(nums);&lt;/P&gt;&lt;P&gt;chars(i)=put(nums(i),best.);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2015 06:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205677#M306387</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-06-14T06:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205678#M306388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively also try the do over with arrays&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array nums num1-num800;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array chars $ char1-char800;&lt;/P&gt;&lt;P&gt;do over nums;&lt;/P&gt;&lt;P&gt;chars=put(nums,best.);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2015 06:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205678#M306388</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-06-14T06:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205679#M306389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jag,&lt;/P&gt;&lt;P&gt;The code works, however, for the numbers less than 1 or including minus, it only gives me '0' or '-'&lt;/P&gt;&lt;P&gt;Is it possible to solve this problem?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Noleen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2015 10:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205679#M306389</guid>
      <dc:creator>Noleen</dc:creator>
      <dc:date>2015-06-14T10:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205680#M306390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please use the put function with best32. format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2015 13:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205680#M306390</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-06-14T13:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205681#M306391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jag,&lt;/P&gt;&lt;P&gt;It doesn't work with best32. format.&lt;/P&gt;&lt;P&gt;Char1-char800 is empty after apply best32. format in put function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I don't know how to attach file in reply. I can send the sample data to your email if you don't mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 12:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205681#M306391</guid>
      <dc:creator>Noleen</dc:creator>
      <dc:date>2015-06-15T12:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205682#M306392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to show your work.&amp;nbsp; AND show some sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 12:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205682#M306392</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-06-15T12:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205683#M306393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please see the attachment for the sample data.&lt;/P&gt;&lt;P&gt;I used Jag's code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; set try;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; array nums(*) num1-num800;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; array chars(*) $ char1-char800;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;do i = 1 to dim(nums);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;chars(i)=put(nums(i),best.);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;It convert the numbers less than 1 or 0 to '0' or missing.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;After I change the format to best32.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; set try;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; array nums(*) num1-num800;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; array chars(*) $ char1-char800;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;do i = 1 to dim(nums);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;chars(i)=put(nums(i),best32.);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;end;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;char1-char800 return blank.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;There is no error or warning.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 13:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205683#M306393</guid>
      <dc:creator>Noleen</dc:creator>
      <dc:date>2015-06-15T13:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205684#M306394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try forcing the lengths of your variables to match the length of your format.&amp;nbsp; For example, to create new variables that are 16 characters long:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array chars (800) $ 16 char1-char800;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then convert numerics to a 16-character format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chars(i) = put(nums(i), best16.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't have to pick 16 characters, but you should match the lengths and the formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 14:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205684#M306394</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-15T14:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert large amount of numeric variables to character variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205685#M306395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works!!&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 07:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-large-amount-of-numeric-variables-to-character/m-p/205685#M306395</guid>
      <dc:creator>Noleen</dc:creator>
      <dc:date>2015-06-17T07:49:01Z</dc:date>
    </item>
  </channel>
</rss>

