<?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: Merging error in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736534#M28738</link>
    <description>&lt;P&gt;No there isn't. You use the INPUT function to convert from character to numeric or the PUT function for numeric to character. You can use arrays to convert a lot of variables at a time but that still requires a minimum of four statements - an ARRAY, a DO, an INPUT function with an assignment, and an END.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 02:13:24 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-04-23T02:13:24Z</dc:date>
    <item>
      <title>Merging error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736533#M28737</link>
      <description>&lt;P&gt;I am trying to merge a few datasets I have. I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Variable year1 has been defined as both character and numeric.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I understand&amp;nbsp;what it means and how it works, however, I am wondering if there is a simple line to convert all observations in the data to numeric (or character for that matter) at once.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 01:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736533#M28737</guid>
      <dc:creator>nmlynar13</dc:creator>
      <dc:date>2021-04-23T01:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Merging error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736534#M28738</link>
      <description>&lt;P&gt;No there isn't. You use the INPUT function to convert from character to numeric or the PUT function for numeric to character. You can use arrays to convert a lot of variables at a time but that still requires a minimum of four statements - an ARRAY, a DO, an INPUT function with an assignment, and an END.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 02:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736534#M28738</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-04-23T02:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Merging error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736539#M28739</link>
      <description>Thank you for the help, I'll try that out!&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Apr 2021 03:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736539#M28739</guid>
      <dc:creator>nmlynar13</dc:creator>
      <dc:date>2021-04-23T03:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Merging error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736575#M28740</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/366638"&gt;@nmlynar13&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition to what has already been said, note that the variable itself has a type (character or numeric), the type of the variable cannot be changed, a new variable of the desired type will have to be created to hold the converted value, as in the example below. If desired, &lt;FONT face="courier new,courier"&gt;drop&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;rename&lt;/FONT&gt; data set options or statements can be used to have the same variable name on the output data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   set sashelp.class;

   /* create a character variable age2 to hold the value of numeric variable age */ 
   age2 = put(age,8.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 10:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-error/m-p/736575#M28740</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2021-04-23T10:37:41Z</dc:date>
    </item>
  </channel>
</rss>

