<?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 REmoving interior Blanks in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36675#M9278</link>
    <description>I Have the following data set;&lt;BR /&gt;
&lt;BR /&gt;
Data daset1;&lt;BR /&gt;
Input location height;&lt;BR /&gt;
cards;&lt;BR /&gt;
A 0.2&lt;BR /&gt;
A 0.8&lt;BR /&gt;
B 0.1&lt;BR /&gt;
.....&lt;BR /&gt;
run;&lt;BR /&gt;
I then use the following command to create a new column.&lt;BR /&gt;
&lt;BR /&gt;
Data daset2;&lt;BR /&gt;
set Dataset1;&lt;BR /&gt;
locheight = location || height;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The output is displayed below&lt;BR /&gt;
&lt;BR /&gt;
location    height    locheight&lt;BR /&gt;
A              0.2         A     0.2&lt;BR /&gt;
A             0.8          A     0.8&lt;BR /&gt;
B             0.1          B     0.1&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how to remove the interior blanks on elements of locheight. That the output appears as folows:&lt;BR /&gt;
&lt;BR /&gt;
location    height    locheight&lt;BR /&gt;
A              0.2         A0.2&lt;BR /&gt;
A             0.8          A0.8&lt;BR /&gt;
B             0.1          B0.1</description>
    <pubDate>Thu, 17 Jun 2010 10:30:47 GMT</pubDate>
    <dc:creator>Statsconsultancy</dc:creator>
    <dc:date>2010-06-17T10:30:47Z</dc:date>
    <item>
      <title>REmoving interior Blanks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36675#M9278</link>
      <description>I Have the following data set;&lt;BR /&gt;
&lt;BR /&gt;
Data daset1;&lt;BR /&gt;
Input location height;&lt;BR /&gt;
cards;&lt;BR /&gt;
A 0.2&lt;BR /&gt;
A 0.8&lt;BR /&gt;
B 0.1&lt;BR /&gt;
.....&lt;BR /&gt;
run;&lt;BR /&gt;
I then use the following command to create a new column.&lt;BR /&gt;
&lt;BR /&gt;
Data daset2;&lt;BR /&gt;
set Dataset1;&lt;BR /&gt;
locheight = location || height;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The output is displayed below&lt;BR /&gt;
&lt;BR /&gt;
location    height    locheight&lt;BR /&gt;
A              0.2         A     0.2&lt;BR /&gt;
A             0.8          A     0.8&lt;BR /&gt;
B             0.1          B     0.1&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how to remove the interior blanks on elements of locheight. That the output appears as folows:&lt;BR /&gt;
&lt;BR /&gt;
location    height    locheight&lt;BR /&gt;
A              0.2         A0.2&lt;BR /&gt;
A             0.8          A0.8&lt;BR /&gt;
B             0.1          B0.1</description>
      <pubDate>Thu, 17 Jun 2010 10:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36675#M9278</guid>
      <dc:creator>Statsconsultancy</dc:creator>
      <dc:date>2010-06-17T10:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: REmoving interior Blanks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36676#M9279</link>
      <description>compress(location || height);&lt;BR /&gt;
or&lt;BR /&gt;
cats(location , height);</description>
      <pubDate>Thu, 17 Jun 2010 11:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36676#M9279</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-06-17T11:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: REmoving interior Blanks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36677#M9280</link>
      <description>Sometimes trailing blanks are troublesome so try using TRIM.&lt;BR /&gt;
&lt;BR /&gt;
concat = trim(var1) || var2; *---&amp;gt; trim removes trailing blanks;&lt;BR /&gt;
&lt;BR /&gt;
another function you may find of interest...COMPRESS&lt;BR /&gt;
&lt;BR /&gt;
concat = var1 || var2;&lt;BR /&gt;
concat = compress(concat);  *---&amp;gt; takes out internal spaces and other chars by default;</description>
      <pubDate>Wed, 14 Jul 2010 21:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36677#M9280</guid>
      <dc:creator>jj030655</dc:creator>
      <dc:date>2010-07-14T21:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: REmoving interior Blanks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36678#M9281</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
You could also use the combination of the COMPBL and COMPRESS functions.&lt;BR /&gt;
The first one will replace double blanks by a single blank whereas the second one will remove the single blanks from your variable.&lt;BR /&gt;
&lt;BR /&gt;
e.g:&lt;BR /&gt;
&lt;BR /&gt;
Data daset2;&lt;BR /&gt;
set Dataset1;&lt;BR /&gt;
locheight = compress(compbl(location || height));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Florent</description>
      <pubDate>Thu, 15 Jul 2010 12:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/REmoving-interior-Blanks/m-p/36678#M9281</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2010-07-15T12:55:47Z</dc:date>
    </item>
  </channel>
</rss>

