<?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 Numeric to character within data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111800#M23163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;I have something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;data one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;merge dataset1 dataset2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;.................&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;if var=1 then var='large'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;else var='small';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;Now, the variable var is extracted from datasets 1 and 2 with a numeric format;however 'large' and 'small' are character and this generates errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;How can I transform from numeric to character within the data step as created above?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;I tried adding "format var $6.;" but this did not solve the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Oct 2013 20:42:28 GMT</pubDate>
    <dc:creator>Bogdan</dc:creator>
    <dc:date>2013-10-13T20:42:28Z</dc:date>
    <item>
      <title>Numeric to character within data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111800#M23163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;I have something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;data one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;merge dataset1 dataset2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;.................&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;if var=1 then var='large'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;else var='small';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;Now, the variable var is extracted from datasets 1 and 2 with a numeric format;however 'large' and 'small' are character and this generates errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;How can I transform from numeric to character within the data step as created above?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;I tried adding "format var $6.;" but this did not solve the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 20:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111800#M23163</guid>
      <dc:creator>Bogdan</dc:creator>
      <dc:date>2013-10-13T20:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character within data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111801#M23164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you really want to assign new values?&amp;nbsp; Or, on the other hand, do you simply want the character values to appear in lists, reports and or analyses?&amp;nbsp; If it is the latter, you can create and assign a format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 21:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111801#M23164</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-10-13T21:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character within data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111802#M23165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use the variable in&lt;/P&gt;&lt;P&gt;proc sgplot;&lt;/P&gt;&lt;P&gt;by var;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So yes, I do no necessarily need to assign new values, but I need more info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 22:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111802#M23165</guid>
      <dc:creator>Bogdan</dc:creator>
      <dc:date>2013-10-13T22:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character within data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111803#M23166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc format ;&lt;/P&gt;&lt;P&gt; value size 1='large' other='small';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sgplot;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;by var;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;format var size. ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 22:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-within-data-step/m-p/111803#M23166</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-13T22:31:27Z</dc:date>
    </item>
  </channel>
</rss>

