<?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 Compress in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112981#M31299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the compress, 'L' modifer adds lowercase letters to the list of characters to be kept or removed, but in the code below the output removes all characters ABCD?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;x='123-4567-8901 B 234-5678-9012 c';&lt;/P&gt;&lt;P&gt;y=compress(x, 'ABCD', 'L');&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Aug 2013 03:54:25 GMT</pubDate>
    <dc:creator>Siddharth123</dc:creator>
    <dc:date>2013-08-16T03:54:25Z</dc:date>
    <item>
      <title>Compress</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112981#M31299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the compress, 'L' modifer adds lowercase letters to the list of characters to be kept or removed, but in the code below the output removes all characters ABCD?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;x='123-4567-8901 B 234-5678-9012 c';&lt;/P&gt;&lt;P&gt;y=compress(x, 'ABCD', 'L');&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 03:54:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112981#M31299</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2013-08-16T03:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Compress</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112982#M31300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because you've asked COMPRESS to remove the letters 'ABCD' (the second argument) AND the third argument ('L') instructs SAS to remove all lowercase letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So . . . all of the letters A, B, C, and D are removed as you requested. And, all lowercase letters are removed as you requested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is the series of numbers, with the sample string you used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 04:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112982#M31300</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-16T04:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compress</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112983#M31301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per the code, in the compress function used compress(x, 'ABCD', 'L'), we are suggesting compress to remove "ABCD" and any lower case letters, so even though the ABCD are all in caps, since we have mentioned them in compress function they are getting removed, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in case you wish to remove only the lower case letters then try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compress(x,, 'L'), this will remove only the lower case letters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output will be&lt;/P&gt;&lt;P&gt;123-4567-8901 B 234-5678-9012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*code*/&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;x='123-4567-8901 B 234-5678-9012 c';&lt;/P&gt;&lt;P&gt;y=compress(x,,'L');&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 04:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress/m-p/112983#M31301</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-08-16T04:53:17Z</dc:date>
    </item>
  </channel>
</rss>

