<?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 Data Cleaning: character vs. numeric variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/494998#M72333</link>
    <description>&lt;PRE&gt;if 01&amp;lt;code&amp;gt;60 then code_error=1;&lt;/PRE&gt;
&lt;P&gt;G' day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I inherited code that checks the range of a variable, example above.&lt;/P&gt;
&lt;P&gt;This variable, code has a length of 2 and is character with leading zeroes: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, etc.&lt;/P&gt;
&lt;P&gt;If a code exists that is 61, then the SAS program identifies it as being &amp;gt;60 and the code_error=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, my question is:&amp;nbsp; is it's a character variable with leading zeroes, how does SAS know whether the variable value is &amp;lt;01 (i.e., 00) or &amp;lt;60?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Sep 2018 19:35:49 GMT</pubDate>
    <dc:creator>jcis7</dc:creator>
    <dc:date>2018-09-12T19:35:49Z</dc:date>
    <item>
      <title>Data Cleaning: character vs. numeric variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/494998#M72333</link>
      <description>&lt;PRE&gt;if 01&amp;lt;code&amp;gt;60 then code_error=1;&lt;/PRE&gt;
&lt;P&gt;G' day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I inherited code that checks the range of a variable, example above.&lt;/P&gt;
&lt;P&gt;This variable, code has a length of 2 and is character with leading zeroes: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, etc.&lt;/P&gt;
&lt;P&gt;If a code exists that is 61, then the SAS program identifies it as being &amp;gt;60 and the code_error=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, my question is:&amp;nbsp; is it's a character variable with leading zeroes, how does SAS know whether the variable value is &amp;lt;01 (i.e., 00) or &amp;lt;60?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 19:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/494998#M72333</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-12T19:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data Cleaning: character vs. numeric variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/495001#M72334</link>
      <description>&lt;P&gt;Recommendation:&amp;nbsp; Fix the code.&amp;nbsp; It's just plain bad code.&amp;nbsp; Would you know how SAS would handle these bad data values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"7" (instead of "07")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"3A" (instead of "30")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's better to fix the code than to try to think of all the possibilities where the code might give the wrong result.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 19:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/495001#M72334</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-12T19:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data Cleaning: character vs. numeric variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/495005#M72335</link>
      <description>Got it - Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Sep 2018 19:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Cleaning-character-vs-numeric-variables/m-p/495005#M72335</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-12T19:51:31Z</dc:date>
    </item>
  </channel>
</rss>

