<?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 in variable type in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703791#M26061</link>
    <description>&lt;P&gt;Just because values contain digits does not mean that your variable is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use Proc Import or one of the widgets to read an external file then decisions as to what type of variable are based on the content of a very few rows of data. If in one file there happens to be text such as "unknown" in the data column then you may end up with character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run Proc Contents on both of the data sets used on the merge. I bet you will find that one version of the variable is numeric and the other is character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you encounter errors and want to ask about them best practice is to copy the entire code of a procedure or data step with all the notes, warnings and errors from the LOG and paste into a code box opened on the forum with the &amp;lt;/&amp;gt;. The code box is important to preserve formatting of the text to preserve the position of the diagnostic characters that SAS often places in the log.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Dec 2020 09:16:53 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-12-05T09:16:53Z</dc:date>
    <item>
      <title>Error in variable type</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703776#M26059</link>
      <description>I have a dataset after merging two datasets ..having common varianle id , though I'd is numeric in both .. after running the merge statement , it is giving error saying variable defined as both character and numeric. I also used put function to convert the variable .. after that too giving the same results. How should I go about ?</description>
      <pubDate>Sat, 05 Dec 2020 07:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703776#M26059</guid>
      <dc:creator>archita</dc:creator>
      <dc:date>2020-12-05T07:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error in variable type</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703781#M26060</link>
      <description>&lt;P&gt;The result of the PUT function is always character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post your code and log.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 08:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703781#M26060</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-05T08:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in variable type</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703791#M26061</link>
      <description>&lt;P&gt;Just because values contain digits does not mean that your variable is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use Proc Import or one of the widgets to read an external file then decisions as to what type of variable are based on the content of a very few rows of data. If in one file there happens to be text such as "unknown" in the data column then you may end up with character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run Proc Contents on both of the data sets used on the merge. I bet you will find that one version of the variable is numeric and the other is character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you encounter errors and want to ask about them best practice is to copy the entire code of a procedure or data step with all the notes, warnings and errors from the LOG and paste into a code box opened on the forum with the &amp;lt;/&amp;gt;. The code box is important to preserve formatting of the text to preserve the position of the diagnostic characters that SAS often places in the log.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 09:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-variable-type/m-p/703791#M26061</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-05T09:16:53Z</dc:date>
    </item>
  </channel>
</rss>

