<?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 Dot value stored as character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147828#M262243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable that is formatted $3. Within this variable there is a value '&amp;nbsp; .' which was causing me some confusion. Initially I thought '.' was the null value for numeric, not character. However it seems this value has 2 spaces in front of it, hence '&amp;nbsp; .' , which lead me to believe it was a character&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when I enter the following tests:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if variable = '&amp;nbsp; .'; &lt;/P&gt;&lt;P&gt;if variable =.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both return true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to understand what this value is that I have here. What is a practical approach from a data hygiene perspective for cleaning this? How is a character variable identified as being equal to both a character value and a numeric value at the same time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2014 18:10:22 GMT</pubDate>
    <dc:creator>mikemangini</dc:creator>
    <dc:date>2014-10-29T18:10:22Z</dc:date>
    <item>
      <title>Dot value stored as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147828#M262243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable that is formatted $3. Within this variable there is a value '&amp;nbsp; .' which was causing me some confusion. Initially I thought '.' was the null value for numeric, not character. However it seems this value has 2 spaces in front of it, hence '&amp;nbsp; .' , which lead me to believe it was a character&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when I enter the following tests:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if variable = '&amp;nbsp; .'; &lt;/P&gt;&lt;P&gt;if variable =.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both return true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to understand what this value is that I have here. What is a practical approach from a data hygiene perspective for cleaning this? How is a character variable identified as being equal to both a character value and a numeric value at the same time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 18:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147828#M262243</guid>
      <dc:creator>mikemangini</dc:creator>
      <dc:date>2014-10-29T18:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dot value stored as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147829#M262244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They both test true because variable is converted to numeric when tested against missing numeric dot.&amp;nbsp; See note below.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As far as "what it is" it is exactly what it appears to be,&amp;nbsp; 2 space and a period.&amp;nbsp; You can test and set to blank if LEFT(VARIABLE) eq '.' then variable='&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variable = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; y = variable eq &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'&amp;nbsp; .'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; z = variable eq &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_all_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;NOTE: &lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; text-decoration: underline;"&gt;Character&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;SPAN style="text-decoration: underline;"&gt; values&lt;/SPAN&gt; have been converted to numeric values at the places given by: (Line):(Column)&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;35&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;variable=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; y=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; z=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _ERROR_=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _N_=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 18:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147829#M262244</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-10-29T18:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dot value stored as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147830#M262245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this clarification is helpful. I didn't realize SAS would automatically convert to numeric like that. I overlooked it in the log. This is valuable information to have.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 19:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dot-value-stored-as-character/m-p/147830#M262245</guid>
      <dc:creator>mikemangini</dc:creator>
      <dc:date>2014-10-29T19:24:53Z</dc:date>
    </item>
  </channel>
</rss>

