<?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 Numbers stored as Char Variables &amp;amp; Their Magnitude in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Numbers-stored-as-Char-Variables-amp-Their-Magnitude/m-p/229470#M54395</link>
    <description>&lt;P&gt;I have&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'1', '2', '3',... stored as a Character variable - Types&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If i want to subset a dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if Types &amp;lt;='10'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will it select all values from '1',....'10'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, does SAS interpret the magnitude of numbers stored as character variable in the same way as&amp;nbsp; numeric variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sun, 11 Oct 2015 11:14:34 GMT</pubDate>
    <dc:creator>apple</dc:creator>
    <dc:date>2015-10-11T11:14:34Z</dc:date>
    <item>
      <title>Numbers stored as Char Variables &amp; Their Magnitude</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numbers-stored-as-Char-Variables-amp-Their-Magnitude/m-p/229470#M54395</link>
      <description>&lt;P&gt;I have&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'1', '2', '3',... stored as a Character variable - Types&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If i want to subset a dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if Types &amp;lt;='10'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will it select all values from '1',....'10'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, does SAS interpret the magnitude of numbers stored as character variable in the same way as&amp;nbsp; numeric variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2015 11:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numbers-stored-as-Char-Variables-amp-Their-Magnitude/m-p/229470#M54395</guid>
      <dc:creator>apple</dc:creator>
      <dc:date>2015-10-11T11:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Numbers stored as Char Variables &amp; Their Magnitude</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numbers-stored-as-Char-Variables-amp-Their-Magnitude/m-p/229472#M54397</link>
      <description>&lt;P&gt;No it doesn't. It compares character by character.&amp;nbsp;&lt;SPAN&gt;You need to convert your characters to numeric for such a comparison.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;23 data _null_;&lt;BR /&gt;24 types='2';&lt;BR /&gt;25 if types&amp;lt;='10' then put 'TRUE';&lt;BR /&gt;26 else put 'FALSE';&lt;BR /&gt;27 &lt;BR /&gt;28 if input(types,best32.)&amp;lt;=10 then put 'TRUE';&lt;BR /&gt;29 else put 'FALSE';&lt;BR /&gt;30 &lt;BR /&gt;31 run;&lt;BR /&gt;&lt;BR /&gt;FALSE&lt;BR /&gt;TRUE&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2015 12:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numbers-stored-as-Char-Variables-amp-Their-Magnitude/m-p/229472#M54397</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-11T12:29:06Z</dc:date>
    </item>
  </channel>
</rss>

