<?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: alpha numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599961#M173297</link>
    <description>&lt;P&gt;Alternatively:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  char_num = '5 x 10 ^ 6';
  num = input(scan(char_num, 1, ' '), best12.) * (input(scan(char_num, 3, ' '), best12.) ** input(scan(char_num, 5, ' '), best12.));
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Oct 2019 01:17:23 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-10-29T01:17:23Z</dc:date>
    <item>
      <title>alpha numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599956#M173293</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I convert a alphanumeric format (character)&amp;nbsp;: 5 x 10 ^ 6 to numeric 5000000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luis.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 00:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599956#M173293</guid>
      <dc:creator>Luis3</dc:creator>
      <dc:date>2019-10-29T00:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: alpha numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599960#M173296</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/161004"&gt;@Luis3&lt;/a&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ ;                                                                                                                           
  c = "5 x 10 ^ 6" ;                                                                                                                    
  n = input (tranwrd (compress (upcase (c)), "X10^", "E"), E32.) ;                                                                      
  put n= ;                                                                                                                              
run ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 01:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599960#M173296</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-10-29T01:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: alpha numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599961#M173297</link>
      <description>&lt;P&gt;Alternatively:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  char_num = '5 x 10 ^ 6';
  num = input(scan(char_num, 1, ' '), best12.) * (input(scan(char_num, 3, ' '), best12.) ** input(scan(char_num, 5, ' '), best12.));
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Oct 2019 01:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599961#M173297</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-29T01:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: alpha numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599971#M173300</link>
      <description>&lt;P&gt;Both answers above look good.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But note there is no need to use E informat instead of the normal numeric informat. In fact E, D, F and BEST are just alias for that informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also the concept of "best" informat doesn't even make sense.&amp;nbsp; I suspect that people get confused because there is a FORMAT named BEST.&amp;nbsp; &amp;nbsp;You use that when you want SAS to make a decision about how many digits to show before/after the decimal place and whether to use exponential notation to best display the number in a specific number of characters.&amp;nbsp; But when reading text into a number there is no decision to be made.&amp;nbsp; There is no "best" way to store a number.&amp;nbsp; A number is just a number.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 03:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599971#M173300</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-29T03:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: alpha numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599973#M173301</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&lt;SPAN&gt;But when reading text into a number there is no decision to be made.&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yeah, there is, to wit: How to &lt;EM&gt;best&lt;/EM&gt; interpret the text according to the rules sewn into the informat in order to arrive at a number. That involves a lot of logic; and the latter is the vehicle through which decisions are made. In this sense, "best" is semantically quite proper, as textual notations denoting quantities come in different forms, and a numeric informat is trying to make the &lt;EM&gt;best&lt;/EM&gt; decision at how to interpret a given form. So, there's nothing wrong, IMO, in calling the standard numeric informat BESTw.d. &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;There is no "best" way to store a number.&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yeah, there is, and it depends on a cornucopia of factors, related to (a) the physical properties of the computing platform and (b) how the number is going to be used. The latter is the reason why different numeric data types exist (and SAS is no exception if we don't limit it to Base where the only type is RB8). Aside from it, a numeric informat makes no decisions on how numbers are &lt;EM&gt;stored&lt;/EM&gt;. Its role is to decide how to &lt;EM&gt;interpret&lt;/EM&gt; a bunch of characters as a number and, if the attempt is successful, pass it to the SAS facility that physically stores it according to the data type of the variable to which it is assigned.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Paul D.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 04:19:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/alpha-numeric/m-p/599973#M173301</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-10-29T04:19:48Z</dc:date>
    </item>
  </channel>
</rss>

