<?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: convert charac variable with alphabets and number combination into numeric. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473615#M121559</link>
    <description>&lt;P&gt;DON'T DO THAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Imagine you also have an ID 0803N0000274.&lt;/P&gt;
&lt;P&gt;ID's are character strings, you don't need them for calculating, so keep them as strings.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217856"&gt;@viz2022&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running into problem. I have a ID fields&amp;nbsp; eg: 0803M0000274&amp;nbsp; and 0526842935 in charc format and want to both convert it into numeric.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;im using&lt;/P&gt;
&lt;P&gt;INPUT(ID,BEST32.) as ID1 and this returns a blank for only alphanumeric field. How do i fix this. I m using Base SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help is appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 07:08:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-27T07:08:40Z</dc:date>
    <item>
      <title>convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473536#M121538</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running into problem. I have a ID fields&amp;nbsp; eg: 0803M0000274&amp;nbsp; and 0526842935 in charc format and want to both convert it into numeric.&amp;nbsp;&lt;/P&gt;&lt;P&gt;im using&lt;/P&gt;&lt;P&gt;INPUT(ID,BEST32.) as ID1 and this returns a blank for only alphanumeric field. How do i fix this. I m using Base SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 20:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473536#M121538</guid>
      <dc:creator>viz2022</dc:creator>
      <dc:date>2018-06-26T20:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473537#M121539</link>
      <description>&lt;P&gt;are you sure you need a numeric subject id? i can't imagine why you would. but if you do: just create another numeric variable counting from 1 to n.&amp;nbsp; i wouldn't tamper with the original id variable, eg you may later obtain new data (with the old id) and your only link will be the subject id, and many other unanticipated issues could arise eg if you converse with others who also access the data but have not recreated id in the same way .... etc&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 20:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473537#M121539</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-06-26T20:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473538#M121540</link>
      <description>&lt;P&gt;&lt;SPAN&gt;0803M0000274 can't be converted to numeric&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Perhaps you could explain further what you would like when converting this to numeric.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 20:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473538#M121540</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-06-26T20:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473559#M121548</link>
      <description>&lt;P&gt;In addition to the other comments suppose you actually have Ids of 0526842935 and 526842935. Converting these to numeric could very well lead to problems as the leading 0 in the first one is likely there for a reason.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 22:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473559#M121548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-26T22:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473615#M121559</link>
      <description>&lt;P&gt;DON'T DO THAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Imagine you also have an ID 0803N0000274.&lt;/P&gt;
&lt;P&gt;ID's are character strings, you don't need them for calculating, so keep them as strings.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217856"&gt;@viz2022&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running into problem. I have a ID fields&amp;nbsp; eg: 0803M0000274&amp;nbsp; and 0526842935 in charc format and want to both convert it into numeric.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;im using&lt;/P&gt;
&lt;P&gt;INPUT(ID,BEST32.) as ID1 and this returns a blank for only alphanumeric field. How do i fix this. I m using Base SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help is appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 07:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473615#M121559</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-27T07:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: convert charac variable with alphabets and number combination into numeric.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473689#M121583</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217856"&gt;@viz2022&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I'm very much with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;. Why do you want to do this? Are you having a problem with leading zero's and ID's for the same person sometimes with and sometimes without leading zeros?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-charac-variable-with-alphabets-and-number-combination/m-p/473689#M121583</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-27T12:26:38Z</dc:date>
    </item>
  </channel>
</rss>

