<?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 Character to numeric in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Character-to-numeric/m-p/278458#M7871</link>
    <description>&lt;P&gt;i have variable family it contains values 0 and 1 in the sas file. but sas shows it a character variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can i convert character variable to numerical.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jun 2016 07:29:45 GMT</pubDate>
    <dc:creator>Jahanzaib</dc:creator>
    <dc:date>2016-06-19T07:29:45Z</dc:date>
    <item>
      <title>Character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Character-to-numeric/m-p/278458#M7871</link>
      <description>&lt;P&gt;i have variable family it contains values 0 and 1 in the sas file. but sas shows it a character variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can i convert character variable to numerical.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2016 07:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Character-to-numeric/m-p/278458#M7871</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-19T07:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Character-to-numeric/m-p/278459#M7872</link>
      <description>&lt;P&gt;It is usually a good idea to store boolean values in a $1. column, as numeric SAS variables use at least 3 bytes for the same Information.&lt;/P&gt;
&lt;P&gt;To convert, use the input function.&lt;/P&gt;
&lt;P&gt;If you positively want to change your datasets(s), consider this macro:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro change_to_num(ds,var);
data &amp;amp;ds;
set &amp;amp;ds(rename=(&amp;amp;var=_old&amp;amp;var));
&amp;amp;var = input(_old&amp;amp;var,best.);
drop _old&amp;amp;var;
run;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jun 2016 07:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Character-to-numeric/m-p/278459#M7872</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-19T07:39:59Z</dc:date>
    </item>
  </channel>
</rss>

