<?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: Changing character value to numeric value receiving error message about missing data. How to res in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821740#M34945</link>
    <description>&lt;P&gt;Are you sure there was no mixed values there that got converted to missing? For example, if someone entered age “5A”, but then that is probably a good thing unless you wish to clean it to something like 5 if you are completely certain that the age is 5. I think both methods, implicit and explicit, would convert age “5A” to missing numeric age.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2022 22:32:31 GMT</pubDate>
    <dc:creator>pink_poodle</dc:creator>
    <dc:date>2022-07-05T22:32:31Z</dc:date>
    <item>
      <title>Changing character value to numeric value receiving error message about missing data. How to resolve</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821732#M34939</link>
      <description>&lt;P&gt;The variables cg_edu and cg_age were entered as character values. I need to change them to numeric values. Below is the code I used with the error message. How do I resolve this problem? Do I have to go into the dataset and change something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cg_edu_numeric = cg_edu + 0;&lt;BR /&gt;cg_age_numeric = cg_age + 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by:&lt;BR /&gt;(Line):(Column).&lt;BR /&gt;2720:15&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;9 at 2720:19&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821732#M34939</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-07-05T22:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821733#M34940</link>
      <description>&lt;P&gt;You're using what's called implicit conversion, where SAS will assume you want numbers and convert it and warn you about it. Use explicit conversion to avoid the warnings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cg_edu_numeric = input(cg_edu, 8.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/414915"&gt;@gtucke1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The variables cg_edu and cg_age were entered as character values. I need to change them to numeric values. Below is the code I used with the error message. How do I resolve this problem? Do I have to go into the dataset and change something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cg_edu_numeric = cg_edu + 0;&lt;BR /&gt;cg_age_numeric = cg_age + 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by:&lt;BR /&gt;(Line):(Column).&lt;BR /&gt;2720:15&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;9 at 2720:19&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821733#M34940</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-05T22:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821734#M34941</link>
      <description>&lt;P&gt;This is not an ERROR, it's a NOTE informing you of the automatic conversion, and that there were 9 missing values.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:16:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821734#M34941</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-05T22:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821735#M34942</link>
      <description>&lt;P&gt;Thank you for the information. I forgot to mention that age and education are in years. Does this change anything in the code you suggested? How did to come to use 8.?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821735#M34942</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-07-05T22:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821736#M34943</link>
      <description>&lt;P&gt;Okay. Since it's a NOTE is the data okay to use?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821736#M34943</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-07-05T22:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821739#M34944</link>
      <description>&lt;P&gt;8. is the informat, which is telling SAS what format it currently is in and how to read the data in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is used for numeric values, years will be fine for 8.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your informat should match how your data appears as text.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821739#M34944</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-05T22:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821740#M34945</link>
      <description>&lt;P&gt;Are you sure there was no mixed values there that got converted to missing? For example, if someone entered age “5A”, but then that is probably a good thing unless you wish to clean it to something like 5 if you are completely certain that the age is 5. I think both methods, implicit and explicit, would convert age “5A” to missing numeric age.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821740#M34945</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-07-05T22:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing character value to numeric value receiving error message about missing data. How to res</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821741#M34946</link>
      <description>&lt;P&gt;Only you can know that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick way to check it is to run a frequency of the new against old data though and see if anything looks weird. I would highly recommend using the INPUT() function to convert your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=dataSetName;
table cg_edu_numeric*cg_edu / MISSING;
table cg_age_numeric*cg_age / MISSING;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Changing-character-value-to-numeric-value-receiving-error/m-p/821741#M34946</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-05T22:37:10Z</dc:date>
    </item>
  </channel>
</rss>

