<?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: Error: Variable has been defined as both character and numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544636#M150637</link>
    <description>Ok i will think and let you know. Thanks for your guidance .Will come again</description>
    <pubDate>Wed, 20 Mar 2019 16:33:11 GMT</pubDate>
    <dc:creator>GeetVish</dc:creator>
    <dc:date>2019-03-20T16:33:11Z</dc:date>
    <item>
      <title>Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544592#M150611</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to append two datasets and i am having an error saying XY variables has been defined as both charcter and numeric. The values are all numeric and some missing like blanks and dots but i want to be numeric.Kindly help, please see the code below with the error message :-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data abc;&lt;BR /&gt;&amp;nbsp;set sourc.data1 sourc.data2;&lt;BR /&gt;&amp;nbsp;Result=input(XY ,best.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Variable XY has been defined as both character and numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Variable Result has already been defined as numeric.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 14:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544592#M150611</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544595#M150613</link>
      <description>&lt;P&gt;The error message pretty much says it all. Please run this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=sourc.data1;
run;

proc contents data=sourc.data2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see the variables section. Then convert the XY variable in one of the data sets accordingly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/164865"&gt;@GeetVish&lt;/a&gt;&amp;nbsp;, please let me know if this solved your problem or you need further assistance. Remember that the INPUT Function requires a character argument &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 15:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544595#M150613</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-20T15:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544602#M150616</link>
      <description>H dray&lt;BR /&gt;I am getting all the values as dots now.:(</description>
      <pubDate>Wed, 20 Mar 2019 15:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544602#M150616</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T15:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544603#M150617</link>
      <description>&lt;P&gt;Please be more specific about what you did and what your data looks like. Did you convert a variable? And what does your log say now?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 15:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544603#M150617</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-20T15:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544606#M150619</link>
      <description>&lt;P&gt;Sorry i am working and messaging thats why its short.&lt;/P&gt;&lt;P&gt;So i found which data set has character variables and i am converting that into numeric. I have the variable values as yes , No, slight, exactly and many numbers . When i did the input(XY, best.) i am getting the new variable as just dots.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 15:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544606#M150619</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T15:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544611#M150621</link>
      <description>&lt;P&gt;Can you show me some of your data? Please run&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc print data=sourc.data1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the result..&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 15:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544611#M150621</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-20T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544624#M150629</link>
      <description>&lt;P&gt;Please see below&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544624#M150629</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T16:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544625#M150630</link>
      <description>&lt;P&gt;So that is your XY variable or? It is clearly a character variable. It makes no sense to represent these values as numbers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I may misunderstand you requirement entirely. However, please be more specific if you want a usable code answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544625#M150630</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-20T16:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544628#M150633</link>
      <description>Yes its my XY variable. i need all the values to stay same and need to be in numeric way.</description>
      <pubDate>Wed, 20 Mar 2019 16:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544628#M150633</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T16:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544632#M150636</link>
      <description>&lt;P&gt;First of all, I can barely see any of your data in the attached file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But let's take a value that I actually can see. You have a &lt;STRONG&gt;character&amp;nbsp;&lt;/STRONG&gt;value of&amp;nbsp;"&lt;STRONG&gt;value=60-177&lt;/STRONG&gt;". What do you want the numerical representation of that value to be? The data seems very unstructured and you can not simply represent the variable XY as numbers.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544632#M150636</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-20T16:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable has been defined as both character and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544636#M150637</link>
      <description>Ok i will think and let you know. Thanks for your guidance .Will come again</description>
      <pubDate>Wed, 20 Mar 2019 16:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Variable-has-been-defined-as-both-character-and-numeric/m-p/544636#M150637</guid>
      <dc:creator>GeetVish</dc:creator>
      <dc:date>2019-03-20T16:33:11Z</dc:date>
    </item>
  </channel>
</rss>

