<?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: compress function not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553177#M153799</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19789"&gt;@dash&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach would be to replace the tabs and "special characters" (assuming these are space characters, e.g. non-breakable spaces 'A0'x) by blanks and then apply the COMPBL function to reduce multiple consecutive blanks to single blanks:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
clob=compbl(translate(clob,' ','0009A0'x));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Please adapt the list of characters, here: '00'x, '09'x [tab], 'A0'x, to your needs. You could use the COMPRESS function with 'w' as the third argument in a preliminary step to find out which non-printable characters are present in your data.)&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 11:53:45 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-04-23T11:53:45Z</dc:date>
    <item>
      <title>compress function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553162#M153794</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am currently trying to match CLOB variable between column of two different datasets.&lt;/P&gt;
&lt;P&gt;Both the variable contain dataset like below including tab/extra space in the middle of sentence and special character.&lt;/P&gt;
&lt;P&gt;When I used compress function, it is not working.&lt;/P&gt;
&lt;P&gt;Can anybody guide me alternative for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLOB variable contain data like below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Gold market's initially tried to&amp;nbsp; &amp;nbsp; rally during the day on Monday-but then found (quite) a bit of resistance.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Chinese-Foreign Minister&amp;nbsp; emphasising that both&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; countries should be sensitive to each other's concern.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How can I remove all spl char and extra space for comparison.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 10:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553162#M153794</guid>
      <dc:creator>dash</dc:creator>
      <dc:date>2019-04-23T10:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: compress function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553169#M153796</link>
      <description>&lt;P&gt;Use Modifier(KW) with compress function like below:&lt;/P&gt;
&lt;P&gt;a=compress(var,,'kw');&lt;/P&gt;
&lt;P&gt;Hope this would resolve issue.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 11:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553169#M153796</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T11:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: compress function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553177#M153799</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19789"&gt;@dash&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach would be to replace the tabs and "special characters" (assuming these are space characters, e.g. non-breakable spaces 'A0'x) by blanks and then apply the COMPBL function to reduce multiple consecutive blanks to single blanks:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
clob=compbl(translate(clob,' ','0009A0'x));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Please adapt the list of characters, here: '00'x, '09'x [tab], 'A0'x, to your needs. You could use the COMPRESS function with 'w' as the third argument in a preliminary step to find out which non-printable characters are present in your data.)&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 11:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553177#M153799</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-04-23T11:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: compress function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553307#M153853</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need to provide example data from multiple sets when discussing "matching" in different data sets.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 15:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/553307#M153853</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-23T15:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: compress function not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/706618#M216884</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19789" target="_blank"&gt;@dash&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following Oracle function can be useful.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
  connect to oracle ... ;
  create table want as select * from connection to oracle (
select 
regexp_replace(clob_var), '[[:space:]]+', chr(4000)) as new_var,
from mytable a
  );
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 12:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-function-not-working/m-p/706618#M216884</guid>
      <dc:creator>TET_34</dc:creator>
      <dc:date>2020-12-17T12:52:30Z</dc:date>
    </item>
  </channel>
</rss>

