<?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 How do I change decimal separator? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703970#M215763</link>
    <description>&lt;P&gt;I'm working with biochemistry data, and in my data set the concentrations of different hormones are registrered as character variables with a comma as decimal separator instead of (the more international) period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change these character variables to numeric variables, and I have tried to use the INPUT function. This doesn't work - maybe because of the comma as decimal separator? Therefore, my questian is: how do I change the decimal separator from "," to ".", when the data is not even registrered as numeric? Maybe it is the format, that should be changed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My variable is called T3_konc and have mostly data with 1 decimal (e.g. 1,3 and 5,8), but a few is "fail" or "hemolysis".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones_new;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; Set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; T3_konc = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;','&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; T3_konc=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'.'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&amp;nbsp;&amp;nbsp; run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This didn't work, maybe because the results are not just a comma - the comma is only the separator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To change from character to numeric variable I have tried:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T3_konc_n = input(T3_konc, &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;best9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 06 Dec 2020 21:26:18 GMT</pubDate>
    <dc:creator>Malene_KH</dc:creator>
    <dc:date>2020-12-06T21:26:18Z</dc:date>
    <item>
      <title>How do I change decimal separator?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703970#M215763</link>
      <description>&lt;P&gt;I'm working with biochemistry data, and in my data set the concentrations of different hormones are registrered as character variables with a comma as decimal separator instead of (the more international) period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change these character variables to numeric variables, and I have tried to use the INPUT function. This doesn't work - maybe because of the comma as decimal separator? Therefore, my questian is: how do I change the decimal separator from "," to ".", when the data is not even registrered as numeric? Maybe it is the format, that should be changed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My variable is called T3_konc and have mostly data with 1 decimal (e.g. 1,3 and 5,8), but a few is "fail" or "hemolysis".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones_new;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; Set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; T3_konc = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;','&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; T3_konc=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'.'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&amp;nbsp;&amp;nbsp; run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This didn't work, maybe because the results are not just a comma - the comma is only the separator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To change from character to numeric variable I have tried:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Thyroid_hormones;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T3_konc_n = input(T3_konc, &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;best9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2020 21:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703970#M215763</guid>
      <dc:creator>Malene_KH</dc:creator>
      <dc:date>2020-12-06T21:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change decimal separator?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703971#M215764</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=leforinforref&amp;amp;docsetTarget=n0aggga4tdr094n14ecw1smkhva7.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;COMMAX&lt;/A&gt; informat.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2020 21:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703971#M215764</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-06T21:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change decimal separator?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703978#M215768</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;a comma as decimal separator instead of (the more international) period.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One might disagree; it's basically the English colonies plus Japan, Korea and and China using the decimal point.&lt;/P&gt;
&lt;P&gt;Not unlike the side of the road used for driving (north America and China switched side).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1607291797980.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52369i7AFA55E98B18D876/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisNZ_0-1607291797980.png" alt="ChrisNZ_0-1607291797980.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2020 22:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-change-decimal-separator/m-p/703978#M215768</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-12-06T22:05:37Z</dc:date>
    </item>
  </channel>
</rss>

