<?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: Converting numeric to character in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614142#M18553</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194348"&gt;@GS2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am combining 2 data sets and I need the variables to be the same (character or numeric) in order to stack the data sets together. However, in one of the data sets dose is a character because of the way the data was enter 10/325 for example.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Had I known that, I would have provided a different solution. Convert the character variable to be numeric. Then "combining" the two data sets will be possible, and dose will have the usefulness that you can analyze it as a number.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2019 20:11:30 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-12-27T20:11:30Z</dc:date>
    <item>
      <title>Converting numeric to character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614117#M18546</link>
      <description>&lt;P&gt;Using SAS 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble converting numeric data into character data. I am using the following code:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;med2_dose = input(med2_dose, 6.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data are purely numbers (ie 1, 20, 25, 100, 250, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever I run this code all of the numeric data is lost in the new variable but it is converted to character. Does anyone know how to correct this? Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 16:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614117#M18546</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2019-12-27T16:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Converting numeric to character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614120#M18547</link>
      <description>&lt;P&gt;Converting numeric to character uses the PUT function, not the INPUT function. You also have to name the resulting character variables something different than the original numeric variable.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Why on earth would you want dose to be character and not numeric?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 16:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614120#M18547</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-27T16:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting numeric to character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614121#M18548</link>
      <description>&lt;P&gt;I am combining 2 data sets and I need the variables to be the same (character or numeric) in order to stack the data sets together. However, in one of the data sets dose is a character because of the way the data was enter 10/325 for example.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 17:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614121#M18548</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2019-12-27T17:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting numeric to character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614122#M18549</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194348"&gt;@GS2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
med2_dose_char = put(med2_dose, 6.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Dec 2019 17:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614122#M18549</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-12-27T17:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Converting numeric to character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614142#M18553</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194348"&gt;@GS2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am combining 2 data sets and I need the variables to be the same (character or numeric) in order to stack the data sets together. However, in one of the data sets dose is a character because of the way the data was enter 10/325 for example.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Had I known that, I would have provided a different solution. Convert the character variable to be numeric. Then "combining" the two data sets will be possible, and dose will have the usefulness that you can analyze it as a number.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 20:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Converting-numeric-to-character/m-p/614142#M18553</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-27T20:11:30Z</dc:date>
    </item>
  </channel>
</rss>

