<?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 option doesn't work sometimes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/452108#M283835</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Here is example code to generate a similar warning:&lt;/P&gt;
&lt;PRE&gt;data work.two (compress=char);
   length x y $20;
   input x y;
   datalines;
ab cd
;
run;&lt;/PRE&gt;
&lt;P&gt;With&amp;nbsp; that example, and changing only the length&amp;nbsp;of the two variables,&amp;nbsp;lengths 7&amp;nbsp; and greater generate the Increased size by 100.00 percent..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 20:59:42 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-04-06T20:59:42Z</dc:date>
    <item>
      <title>Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451734#M283828</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm still looking for this information:&lt;BR /&gt;&lt;BR /&gt;Why sometimes compression is disabled and sometimes it doesn't? &lt;BR /&gt;&lt;BR /&gt;NOTE: Compression was disabled for data set WORK.ONE because compression would increase the size of the data set.&lt;BR /&gt;NOTE: Compressing data set WORK.ONE increased size by 100.00 percent.&lt;BR /&gt;&lt;BR /&gt;THANKS !!!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 00:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451734#M283828</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2018-04-06T00:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451735#M283829</link>
      <description>&lt;P&gt;It's not clear what you are asking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you read the note?&amp;nbsp; SAS told you why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you asking why compression sometimes increases the size of a data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you asking what process SAS uses to determine if compression would save anything?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you asking if there are any other factors that SAS considers when deciding whether or not to compress?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you asking when you as the programmer can control whether compression takes place?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451735#M283829</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-06T01:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451742#M283830</link>
      <description>&lt;P&gt;I want to know if there's a way to never let it increase.&lt;/P&gt;
&lt;P&gt;Like always disabling compression when COMPRESS would increase.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451742#M283830</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2018-04-06T01:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451750#M283831</link>
      <description>&lt;P&gt;That is what it's supposed to do. The first error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE: Compression was disabled for data set WORK.ONE because compression would increase the size of the data set.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't usually see the second message so I'm confused about that. The docs have an example and it DOES NOT have that message. Maybe you have an older version of SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation explains how compression can make the file bigger in the last section here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0y0x1j67vtqhnn1on1cs7trim16.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1mv3asl82nw64n0zpd8v283k0mr" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0y0x1j67vtqhnn1on1cs7trim16.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1mv3asl82nw64n0zpd8v283k0mr&lt;/A&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>Fri, 06 Apr 2018 02:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451750#M283831</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-06T02:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451753#M283832</link>
      <description>&lt;P&gt;That's the point......&lt;/P&gt;
&lt;P&gt;I don't know why sometimes I get 1st NOTE and sometimes 2nd. It should always disable compress, not letting it increase.&lt;/P&gt;
&lt;P&gt;Then many data sets have negative PCOMPRESS&amp;nbsp; (eg: -43%), consuming disk.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 02:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451753#M283832</guid>
      <dc:creator>Krohn</dc:creator>
      <dc:date>2018-04-06T02:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451754#M283833</link>
      <description>&lt;P&gt;No, it's not always disabled, but there is a rule.&lt;/P&gt;
&lt;P&gt;It was in the link, I pasted the relevant section below for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When a request is made to compress a data set, SAS attempts to determine whether compression will increase the size of the file. SAS examines the lengths of the variables. &lt;FONT color="#000000"&gt;&lt;STRONG&gt;If, due to the number and lengths of the variables, it is not possible for the compressed file to be at least 12 bytes (for a 32-bit host) or 24 bytes (for a 64-bit host) per observation smaller than an uncompressed version, compression is disabled and a message is written to the SAS log.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/14864"&gt;@Krohn&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;That's the point......&lt;/P&gt;
&lt;P&gt;I don't know why sometimes I get 1st NOTE and sometimes 2nd. It should always disable compress, not letting it increase.&lt;/P&gt;
&lt;P&gt;Then many data sets have negative PCOMPRESS&amp;nbsp; (eg: -43%), consuming disk.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 02:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451754#M283833</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-06T02:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451773#M283834</link>
      <description>&lt;P&gt;It will not compress when it is impossible that compression will save space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise it actually runs the compression algorithm and then reports the results.&amp;nbsp; To know how well it worked it needs to process the whole file.&amp;nbsp; At that point to go back and turn OFF the compression it would have to re-process the file again and SAS does not have any method to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 06:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/451773#M283834</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-06T06:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/452108#M283835</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Here is example code to generate a similar warning:&lt;/P&gt;
&lt;PRE&gt;data work.two (compress=char);
   length x y $20;
   input x y;
   datalines;
ab cd
;
run;&lt;/PRE&gt;
&lt;P&gt;With&amp;nbsp; that example, and changing only the length&amp;nbsp;of the two variables,&amp;nbsp;lengths 7&amp;nbsp; and greater generate the Increased size by 100.00 percent..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 20:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/452108#M283835</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-06T20:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compress option doesn't work sometimes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/452117#M283836</link>
      <description>&lt;P&gt;I agree it can happen but in that case you don't get both messages, the OP's original post made it seem like that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given the rule I posted earlier, I suspect this would only ever occur with really small files and personally, a 28k set being double in size doesn't concern me at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-option-doesn-t-work-sometimes/m-p/452117#M283836</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-06T21:39:40Z</dc:date>
    </item>
  </channel>
</rss>

