<?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: kcompress modifier Alternative in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516737#M139599</link>
    <description>&lt;P&gt;You don't have to use kcompress, you only use it when the string might contain double or more byte characters - and if you phone numbers contain those I would be worried.&amp;nbsp; Anyways, work around it by something like:&lt;/P&gt;
&lt;PRE&gt;compress(kcompress(phone,""),"01234567890+")&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Nov 2018 15:31:47 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-28T15:31:47Z</dc:date>
    <item>
      <title>kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516728#M139595</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216503"&gt;@all&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After switching from local to server, we had&amp;nbsp;to change some functions in our&amp;nbsp;programming.&lt;/P&gt;&lt;P&gt;The reason behind&amp;nbsp;this is the utf-8&amp;nbsp;compatibility. The version we use is SAS 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One function we had to change is compress to kcompress.&lt;/P&gt;&lt;P&gt;Which is quite painful since kcompress doesn't support modifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a program that tries to fix telephone numbers.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.DQ;
	Phone='+49O64343565ABC'; output;
run;
data work.DQ; set work.DQ;
	DQ_Phone=compress(Phone,"0123456789+",'k');
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea how to extract a certain list of characters from one string and insert it into another without using compress and modifier?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roman&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516728#M139595</guid>
      <dc:creator>RoHa</dc:creator>
      <dc:date>2018-11-28T15:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516737#M139599</link>
      <description>&lt;P&gt;You don't have to use kcompress, you only use it when the string might contain double or more byte characters - and if you phone numbers contain those I would be worried.&amp;nbsp; Anyways, work around it by something like:&lt;/P&gt;
&lt;PRE&gt;compress(kcompress(phone,""),"01234567890+")&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516737#M139599</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-28T15:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516754#M139605</link>
      <description>&lt;P&gt;Unfortunately there is a good chance a phone number could&amp;nbsp;contain ä,ü,ö&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token punctuation"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 16:05:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516754#M139605</guid>
      <dc:creator>RoHa</dc:creator>
      <dc:date>2018-11-28T16:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516762#M139607</link>
      <description>&lt;P&gt;But those are single byte characters so shouldn't cause an issue for compress?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 16:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516762#M139607</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-28T16:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516778#M139612</link>
      <description>are you sure? because testing revealed problems with them in the utf-8 environment and I think they are double byte characters. For Example: ä should be 11000011 10100100 in UTF-8 binary&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Nov 2018 16:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516778#M139612</guid>
      <dc:creator>RoHa</dc:creator>
      <dc:date>2018-11-28T16:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: kcompress modifier Alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516968#M139668</link>
      <description>&lt;P&gt;If you can provide some example - test data in the form of a datastep - which illustrates your issue I can look, but this:&lt;/P&gt;
&lt;PRE&gt;data have;
  a="abcdäefg1234";
  b=compress(a,"","kd");
run;&lt;/PRE&gt;
&lt;P&gt;Works fine for me.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 09:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/kcompress-modifier-Alternative/m-p/516968#M139668</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-29T09:24:28Z</dc:date>
    </item>
  </channel>
</rss>

