<?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 How to keep only digits when data contents numeric and alphabets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419516#M103165</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input a $;
cards;
acc&amp;gt;&amp;gt;&amp;gt;
qe
12.3hjj
78.0
88
run;

Required output;


12.3
78.0
88

I have written in this way:

data have;
input a$;
a1=compress(a,'1234567890.','k');
cards;
acc&amp;gt;&amp;gt;&amp;gt;
qe
12.3hjj
78.0
88
run;
&lt;BR /&gt;Is there any other way?


&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Dec 2017 10:29:49 GMT</pubDate>
    <dc:creator>rajeshalwayswel</dc:creator>
    <dc:date>2017-12-08T10:29:49Z</dc:date>
    <item>
      <title>How to keep only digits when data contents numeric and alphabets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419516#M103165</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input a $;
cards;
acc&amp;gt;&amp;gt;&amp;gt;
qe
12.3hjj
78.0
88
run;

Required output;


12.3
78.0
88

I have written in this way:

data have;
input a$;
a1=compress(a,'1234567890.','k');
cards;
acc&amp;gt;&amp;gt;&amp;gt;
qe
12.3hjj
78.0
88
run;
&lt;BR /&gt;Is there any other way?


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2017 10:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419516#M103165</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2017-12-08T10:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep only digits when data contents numeric and alphabets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419518#M103166</link>
      <description>&lt;P&gt;you can do this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;a1=compress(a,'','kpd');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you want to do when a does not contain numbers?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 10:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419518#M103166</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-12-08T10:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep only digits when data contents numeric and alphabets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419520#M103167</link>
      <description>&lt;P&gt;Missing when it contains character, special characters.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 10:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419520#M103167</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2017-12-08T10:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep only digits when data contents numeric and alphabets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419528#M103168</link>
      <description>&lt;P&gt;I would be fine with a missing observation&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 11:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-only-digits-when-data-contents-numeric-and-alphabets/m-p/419528#M103168</guid>
      <dc:creator>Rickyboy</dc:creator>
      <dc:date>2017-12-08T11:34:15Z</dc:date>
    </item>
  </channel>
</rss>

