<?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: unexpected conversion from number to character, SAS v 9.4 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324454#M72043</link>
    <description>&lt;P&gt;Proc import wouldn't generate that error, so what's the code that generates the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was the import correct, is the value read in correctly? Proc import guesses when importing since Excel doesn't follow any database standards so the data can be anything.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 02:57:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-01-13T02:57:20Z</dc:date>
    <item>
      <title>unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324444#M72036</link>
      <description>&lt;P&gt;After importing an Excel file with a numeric variable, &lt;FONT color="#0000FF"&gt;Var1&lt;/FONT&gt;, I'm getting the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;FONT color="#0000FF"&gt; "NOTE: Numeric values have been converted to character values at the places given by..."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the following statements, but still get&amp;nbsp;the same error.&amp;nbsp;What might be causing this &amp;amp; what's the fix? &amp;nbsp;There are &lt;U&gt;no&lt;/U&gt;&amp;nbsp;character values in the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   new9=input(Var1,4.1);
   drop Var1;
   rename new9=Var1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 00:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324444#M72036</guid>
      <dc:creator>JRake</dc:creator>
      <dc:date>2017-01-13T00:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324445#M72037</link>
      <description>&lt;P&gt;According to the documentation:&amp;nbsp;&lt;SPAN&gt;Use INPUT to convert character values to numeric values or other character values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's already numeric, you should just rename it (if desired) and apply whatever format you want for the variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 00:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324445#M72037</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-13T00:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324446#M72038</link>
      <description>Is my code snippet incorrect?&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Jan 2017 00:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324446#M72038</guid>
      <dc:creator>JRake</dc:creator>
      <dc:date>2017-01-13T00:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324447#M72039</link>
      <description>&lt;P&gt;Sounds like you only want/need something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp; set have (rename=(var1=var9));&lt;BR /&gt;&amp;nbsp; format var9 4.1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 00:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324447#M72039</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-13T00:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324453#M72042</link>
      <description>&lt;P&gt;Why is it that you think VAR1 was character after the import? &amp;nbsp;Did you run a PROC CONTENTS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code might be correct for a character VAR1. &amp;nbsp;(It also might not ... the 4.1 informat&amp;nbsp;will insert a decimal point if it doesn't find one in the incoming string, but that's a secondary issue.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fact that you are getting the conversion message when you execute your sample statements means that VAR1 is already numeric. &amp;nbsp;The software had to convert it to character in order to apply the INPUT function. &amp;nbsp;Run a PROC CONTENTS before fiddling with the data to find out which variable is the real troublemaker.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 02:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324453#M72042</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-13T02:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected conversion from number to character, SAS v 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324454#M72043</link>
      <description>&lt;P&gt;Proc import wouldn't generate that error, so what's the code that generates the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was the import correct, is the value read in correctly? Proc import guesses when importing since Excel doesn't follow any database standards so the data can be anything.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 02:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unexpected-conversion-from-number-to-character-SAS-v-9-4/m-p/324454#M72043</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-13T02:57:20Z</dc:date>
    </item>
  </channel>
</rss>

