<?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: How to convert character(numbers/alphabets) to numeric? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404338#M98286</link>
    <description>&lt;P&gt;Thank you for the reply. I don't want to remove any character from the variable. Need exact&amp;nbsp; old_variable to numeric.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2017 01:24:07 GMT</pubDate>
    <dc:creator>Kalai2008</dc:creator>
    <dc:date>2017-10-16T01:24:07Z</dc:date>
    <item>
      <title>How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404329#M98282</link>
      <description>&lt;P&gt;Trying to convert the Character variable to Numeric using INPUT function,but getting error&amp;nbsp; NOTE: Invalid argument to function INPUT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OLD_Variable :&lt;/P&gt;&lt;P&gt;10202008AB_RANK00325---(Proc contents : Type: Char . Len:100 Format $100. Informat $100.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set test1;&lt;/P&gt;&lt;P&gt;new_var=input(old_variable, $25.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output : new_var is still in character format.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 00:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404329#M98282</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-10-16T00:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404336#M98284</link>
      <description>&lt;P&gt;If you want the decimal number at the start of your field, try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new_var = input(old_variable, 8.);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the number is hexadecimal:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new_var = input(old_variable, hex10.);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or, if you want the number at the end:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new_var = input (substr(old_variable, 16), 5.);&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:20:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404336#M98284</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-16T01:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404337#M98285</link>
      <description>&lt;P&gt;Hi Kalai2008&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a numeric variable you should remove the $ from the input function&amp;nbsp; ie you just need new_var=input(old_variable, 25.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However this will likely result in a numeric variable with missing values since it looks like OLD_VARIABLE contains characters/letters as well as numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You won't be able to convert OLD_VARIABLE to numeric unless you remove the characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What numeric value do you hope to see from&lt;/P&gt;
&lt;P&gt;"10202008AB_RANK00325" ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:20:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404337#M98285</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2017-10-16T01:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404338#M98286</link>
      <description>&lt;P&gt;Thank you for the reply. I don't want to remove any character from the variable. Need exact&amp;nbsp; old_variable to numeric.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404338#M98286</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-10-16T01:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404339#M98287</link>
      <description>&lt;P&gt;Ah, I misunderstood what old_variable contains.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If old_variable doesn't contain any characters, then PG's answer should be what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404339#M98287</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2017-10-16T01:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404341#M98288</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me make it clear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the OLD_Variable which is in character format with letters/numbers (10202008AB_RANK00325)&lt;/P&gt;&lt;P&gt;to be converted into new variable as Numeric without eliminating/truncating any letter or numbers.&lt;/P&gt;&lt;P&gt;I want exactly the same as Numeric Variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404341#M98288</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-10-16T01:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404345#M98289</link>
      <description>&lt;P&gt;&lt;SPAN&gt;(10202008AB_RANK00325)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You want a numeric from the above. I only know that a NUMERIC contains only digits from 0 to 9.&amp;nbsp; Can you show how&amp;nbsp; you want that numeric should look like?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 02:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404345#M98289</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2017-10-16T02:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404348#M98290</link>
      <description>&lt;P&gt;If&amp;nbsp;old_variable contains a valid number and&amp;nbsp;you want to convert the whole field, use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new_var = input(old_variable, best32.);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first 32 non blank characters will be converted to a number.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 03:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404348#M98290</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-16T03:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404363#M98291</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86703"&gt;@Kalai2008&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me make it clear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want the OLD_Variable which is in character format with letters/numbers (10202008AB_RANK00325)&lt;/P&gt;
&lt;P&gt;to be converted into new variable as Numeric without eliminating/truncating any letter or numbers.&lt;/P&gt;
&lt;P&gt;I want exactly the same as Numeric Variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This isn't possible, &lt;STRONG&gt;a numeric variable does not have letters in it&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to do that you feel you need a numeric variable? Perhaps there's another way to achieve this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 04:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/404363#M98291</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-16T04:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539887#M148858</link>
      <description>&lt;P&gt;Hi PG&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how I could make sas to put a missing value for any numeric number that has a letter like this 1836398E777?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 11:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539887#M148858</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2019-03-03T11:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539913#M148868</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151600"&gt;@Barkamih&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi PG&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how I could make sas to put a missing value for any numeric number that has a letter like this 1836398E777?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating a new thread would have been better, than adding something to an old topic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a data step use &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;num_var = input(old_var, ??, best32.);&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Mar 2019 17:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539913#M148868</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-03T17:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539929#M148871</link>
      <description>&lt;P&gt;No comma after the question marks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;new_var = input(old_variable, ?? best32.);&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 19:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539929#M148871</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-03T19:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539932#M148872</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151600"&gt;@Barkamih&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi PG&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how I could make sas to put a missing value for any numeric number that has a letter like this 1836398E777?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can use the ? and/or ?? modifier on the informat.&lt;/P&gt;
&lt;PRE&gt;183  data _null_;
184    input ch $32. ;
185    num=input(ch,??32.);
186    put ch= $quote. num= best32. ;
187  cards;

ch="1836398E777" num=.
ch="1235678" num=1235678
ch="1235E56" num=1.235E59&lt;/PRE&gt;
&lt;P&gt;Note that have a single letter E (or D) in the string will cause SAS to treat that as scientific notation.&lt;/P&gt;
&lt;P&gt;Note also that there is no "best" informat. If you use BEST32. as the informat that is just the same as 32. (or F32.).&amp;nbsp; The BEST format makes a decision about how to format a particular number to fit in a limited number of characters. For reading a character string into a number there is no similar decision that needs to be made.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 19:48:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539932#M148872</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-03T19:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539953#M148884</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; How I could make sas to put a missing value for any numeric number that has a letter like this 1836398E777?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data WANT;
  '10202008AB_RANK00325'n = '222';
  NUM=ifn(anyalpha('10202008AB_RANK00325'n), ., input('10202008AB_RANK00325'n, ?? 32.));
  drop '10202008AB_RANK00325'n;
  rename NUM='10202008AB_RANK00325'n;        
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 03:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539953#M148884</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-03-04T03:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539965#M148885</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86703"&gt;@Kalai2008&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Trying to convert the Character variable to Numeric using INPUT function,but getting error&amp;nbsp; NOTE: Invalid argument to function INPUT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OLD_Variable :&lt;/P&gt;&lt;P&gt;10202008AB_RANK00325---(Proc contents : Type: Char . Len:100 Format $100. Informat $100.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set test1;&lt;/P&gt;&lt;P&gt;new_var=input(old_variable, $25.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output : new_var is still in character format.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're all guessing here...and you still don't have an answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your old character variable is:&amp;nbsp; OLD_Variable = '10202008AB_RANK00325---'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Post &lt;U&gt;&lt;STRONG&gt;EXACTLY&lt;/STRONG&gt; &lt;/U&gt;what you want the NEW_Variable to be.&amp;nbsp; IOW, NEW_Variable = ???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once we have your OLD_Variable ("have") and NEW_Variable ("want"), we can tell you if that is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you think a numeric variable can contain letters, you need to hit the docs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.:&amp;nbsp; Some general rules re: put/input/formats/informats:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The put function always returns character output, accepts either a numeric or character input, accepts either a numeric or character format, the type of format should match the type of input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The input function always takes a character input, returns either a numeric or character output, accepts either a numeric or character informat, the type of informat should match the type of output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anything else will result in implicit type conversion or an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;new_var=input(old_variable, $25.);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;has a character informat, so will return a character result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 04:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539965#M148885</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-03-04T04:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character(numbers/alphabets) to numeric?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539984#M148890</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86703"&gt;@Kalai2008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can read a string which only consists of digits into a numeric variable but you can't do the same for an alphanumeric string. That's a general "rule" which applies to all programming languages/databases I know.&lt;/P&gt;
&lt;P&gt;So, as others asked, WHY do you want to convert your string into a numerical value? What do you intend to do with it that requires it to be numerical?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 09:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-character-numbers-alphabets-to-numeric/m-p/539984#M148890</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-03-04T09:50:07Z</dc:date>
    </item>
  </channel>
</rss>

