<?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 the charater by one single space? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630111#M186488</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to remove all the numeric but keep one space between the&amp;nbsp;text as I show in the result column.&amp;nbsp;&amp;nbsp; Please help.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datain9;
      infile datalines dsd;
  input Name : $300. Result : $ 100. ;
datalines;
	Car_ID_6666, Car ID,
	Home_000_9463_Address, Home Address,
	30890_Zip_Code, Zip Code,
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Mar 2020 15:49:44 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2020-03-06T15:49:44Z</dc:date>
    <item>
      <title>How to keep the charater by one single space?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630111#M186488</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to remove all the numeric but keep one space between the&amp;nbsp;text as I show in the result column.&amp;nbsp;&amp;nbsp; Please help.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datain9;
      infile datalines dsd;
  input Name : $300. Result : $ 100. ;
datalines;
	Car_ID_6666, Car ID,
	Home_000_9463_Address, Home Address,
	30890_Zip_Code, Zip Code,
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630111#M186488</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-03-06T15:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep the charater by one single space?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630117#M186490</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data datain9;
      infile datalines dsd;
  input Name : $300. Result : $ 100. ;
datalines;
	Car_ID_6666, Car ID,
	Home_000_9463_Address, Home Address,
	30890_Zip_Code, Zip Code,
;
run;

data want;
 set datain9;
 want=compbl(translate(compress(name,,'d'),' ','_'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:53:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630117#M186490</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-06T15:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep the charater by one single space?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630121#M186491</link>
      <description>&lt;P&gt;Your best bet is probably a combination of functions. I chose COMPRESS to get rid of your digits, TRANSLATE to turn your underscores into spaces, COMPBL to take care of any interior spaces that were longer than a single blank, and STRIP to make sure there weren't any leading (or trailing) spaces hanging around. Other combinations of functions will certainly work, but this allows you to use a single function to target each of the issues you're facing.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input Name : $300.;
  cards;
Car_ID_6666
Home_000_9463_Address
30890_Zip_Code
  ;
run;

data want;
  set have;
  Result = strip(compbl((translate(compress(name,,'d'),' ','_'))));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-keep-the-charater-by-one-single-space/m-p/630121#M186491</guid>
      <dc:creator>Duggins</dc:creator>
      <dc:date>2020-03-06T15:57:34Z</dc:date>
    </item>
  </channel>
</rss>

