<?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: Remove spaces type characters from string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271637#M269491</link>
    <description>&lt;P&gt;You're on the right track. Try the modifiers with the COMPRESS function, specifically S:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;COMPRESS (CN, , 's'), &lt;/CODE&gt;&lt;/PRE&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-value"&gt;s or S&lt;/TD&gt;
&lt;TD&gt;adds space characters (blank, horizontal tab, vertical tab, carriage return, line feed, form feed, and NBSP ('A0'x, or 160 decimal ASCII) to the list of characters.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Thu, 19 May 2016 08:28:16 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-05-19T08:28:16Z</dc:date>
    <item>
      <title>Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271630#M269490</link>
      <description>&lt;P&gt;Hello SAS Experts,&lt;/P&gt;
&lt;P&gt;I get data via an XLSX import that contains the HEX symbol A0 or &amp;amp;nbsp;, it looks like a space, but istn.&lt;/P&gt;
&lt;P&gt;How can I remove this "fake" space?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far this did not work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql; &lt;BR /&gt;CREATE TABLE _testtest AS&lt;BR /&gt;SELECT &lt;BR /&gt;TRANWRD (CN,' ',''), &lt;BR /&gt;COMPRESS (CN), &lt;BR /&gt;CN&lt;BR /&gt;FROM xxx;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bye&lt;/P&gt;
&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 08:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271630#M269490</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-05-19T08:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271637#M269491</link>
      <description>&lt;P&gt;You're on the right track. Try the modifiers with the COMPRESS function, specifically S:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;COMPRESS (CN, , 's'), &lt;/CODE&gt;&lt;/PRE&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-value"&gt;s or S&lt;/TD&gt;
&lt;TD&gt;adds space characters (blank, horizontal tab, vertical tab, carriage return, line feed, form feed, and NBSP ('A0'x, or 160 decimal ASCII) to the list of characters.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 19 May 2016 08:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271637#M269491</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-19T08:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271651#M269492</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;I tried but it did not work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql; &lt;BR /&gt;CREATE TABLE testtest AS&lt;BR /&gt;SELECT &lt;BR /&gt;COMPRESS (CN, , 'S'), &lt;BR /&gt;CN&lt;BR /&gt;FROM xxx ;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I added a screen print. Tried with capital and non-cap S.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12551i4AD69D44C19086F7/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="cn.png" title="cn.png" /&gt;</description>
      <pubDate>Thu, 19 May 2016 09:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271651#M269492</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-05-19T09:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271665#M269493</link>
      <description>&lt;P&gt;Create a new column with double the length of the original column and use the $HEXw. format to convert to hexadecimal representation, so you can see the offending character codes.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 09:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271665#M269493</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-19T09:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271670#M269494</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;
&lt;P&gt;Its A0 and tons of spaces 20.&lt;/P&gt;
&lt;P&gt;I attached a new screen print.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql; &lt;BR /&gt;CREATE TABLE test AS&lt;BR /&gt;SELECT &lt;BR /&gt;COMPRESS (CN, , 's'), &lt;BR /&gt;CN&lt;BR /&gt;&amp;nbsp; FORMAT=$HEX26.&lt;BR /&gt;FROM xxxx ;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12552iD56CC9F3E92F04E0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="hex2.png" title="hex2.png" /&gt;</description>
      <pubDate>Thu, 19 May 2016 10:12:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271670#M269494</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-05-19T10:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove spaces type characters from string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271672#M269495</link>
      <description>&lt;P&gt;Then I'd try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compress(cn,'A0'x,'s')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 May 2016 10:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-spaces-type-characters-from-string/m-p/271672#M269495</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-19T10:32:17Z</dc:date>
    </item>
  </channel>
</rss>

