<?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 Automatically compress when using proc import in SAS ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723361#M224454</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today, when playing with PROC IMPORT, I have a look on the log and see that SAS automatically compress my files, I check again and see that I &lt;STRONG&gt;did not&lt;/STRONG&gt; put the&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options compress=yes reuse=yes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The code is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile= "E:\Harv 27th_Feb_2021\Report final\exchange_rate_Datastream_adjusted_xlsx" 
                  out= exc_rate
                  dbms= xlsx 
                  replace;
          range= "Sheet1$A:BC";
          getnames= yes;
run;

proc contents data=exc_rate out=abc;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the log is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;28         proc import datafile= "E:\Harv 27th_Feb_2021\Report final\exchange_rate_Datastream_adjusted_xlsx"
29                           out= exc_rate
30                           dbms= xlsx
31                           replace;
32                   range= "Sheet1$A:BC";
33                   getnames= yes;
34         run;

NOTE: The import data set has 5784 observations and 55 variables.
NOTE: Compressing data set WORK.EXC_RATE decreased size by 5.00 percent. 
      Compressed is 38 pages; un-compressed would require 40 pages.
NOTE: WORK.EXC_RATE data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           2.72 seconds
      cpu time            2.64 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So, compressing a file when using the &lt;STRONG&gt;PROC IMPORT&lt;/STRONG&gt; is a function in SAS automatically?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Mar 2021 05:02:52 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2021-03-04T05:02:52Z</dc:date>
    <item>
      <title>Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723361#M224454</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today, when playing with PROC IMPORT, I have a look on the log and see that SAS automatically compress my files, I check again and see that I &lt;STRONG&gt;did not&lt;/STRONG&gt; put the&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options compress=yes reuse=yes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The code is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile= "E:\Harv 27th_Feb_2021\Report final\exchange_rate_Datastream_adjusted_xlsx" 
                  out= exc_rate
                  dbms= xlsx 
                  replace;
          range= "Sheet1$A:BC";
          getnames= yes;
run;

proc contents data=exc_rate out=abc;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the log is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;28         proc import datafile= "E:\Harv 27th_Feb_2021\Report final\exchange_rate_Datastream_adjusted_xlsx"
29                           out= exc_rate
30                           dbms= xlsx
31                           replace;
32                   range= "Sheet1$A:BC";
33                   getnames= yes;
34         run;

NOTE: The import data set has 5784 observations and 55 variables.
NOTE: Compressing data set WORK.EXC_RATE decreased size by 5.00 percent. 
      Compressed is 38 pages; un-compressed would require 40 pages.
NOTE: WORK.EXC_RATE data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           2.72 seconds
      cpu time            2.64 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So, compressing a file when using the &lt;STRONG&gt;PROC IMPORT&lt;/STRONG&gt; is a function in SAS automatically?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 05:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723361#M224454</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-04T05:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723364#M224457</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;So, compressing a file when using the &lt;STRONG&gt;PROC IMPORT&lt;/STRONG&gt; is a function in SAS automatically?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, it is not. But a library can be assigned with compress-option, so that all datasets created in that library inherit the compress option.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 05:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723364#M224457</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-04T05:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723371#M224461</link>
      <description>&lt;P&gt;Also, the option might be set globally, in the config or the autoexec files.&lt;/P&gt;
&lt;P&gt;You can run proc options to see the setting.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 06:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723371#M224461</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-04T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723386#M224467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for leading me to another PROC.&lt;/P&gt;
&lt;P data-unlink="true"&gt;I follow &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n18l72ouwixr9un16q91zsfjeu3b.htm&amp;amp;locale=en#n19d0o2al3ed2mn1bpev4imckl1g" target="_self"&gt;this link&lt;/A&gt;&amp;nbsp;to learn about PROC OPTIONS.&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;From this document, they said PROC OPTIONS:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;SPAN&gt;Lists the current settings of SAS system options in the SAS log&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P data-unlink="true"&gt;So, it means that this PROC list all the options I have already set in my SAS EG, am I correct? or all the SAS OPTIONS available that I can set?&lt;/P&gt;
&lt;P data-unlink="true"&gt;So, when I run the code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options DEFINE;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P data-unlink="true"&gt;The log is really long, I search the keyword COMPRESS and I saw this one&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   Group= COMMUNICATIONS
    Group Description: Remote communications and shared settings
    Description: Specifies the communication access method for connecting client and server sessions across a network.
    Type: The option value is of type CHARACTER
          Maximum Number of Characters: 8
          Casing: The option value is retained uppercased
          Quotes: If present during "set", start and end quotes are removed
          Parentheses: The option value does not require enclosure within parentheses. If present, the parentheses are retained.
          Expansion: Environment variables, within the option value, are not expanded
    When Can Set: Startup or anytime during the SAS Session
    Restricted: Your Site Administrator can restrict modification of this option
    Optsave: PROC Optsave or command Dmoptsave will save this option
 COMPRESS=YES
Option Definition Information for SAS Option COMPRESS&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P data-unlink="true"&gt;Does it mean that I already set OPTIONS COMPRESS globally in my SAS EG?&lt;/P&gt;
&lt;P data-unlink="true"&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 09:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723386#M224467</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-04T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723535#M224531</link>
      <description>&lt;P&gt;Yes you have a global compress turned on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From my system, to check just the Compress option&lt;/P&gt;
&lt;PRE&gt;78   proc options option=compress;
79   run;

    SAS (r) Proprietary Software Release 9.4  TS1M4

 COMPRESS=NO       Specifies the type of compression to use for observations in output SAS data
                   sets.
&lt;/PRE&gt;
&lt;P&gt;So by default my data sets are not compressed.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723535#M224531</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-04T17:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically compress when using proc import in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723588#M224547</link>
      <description>&lt;P&gt;Note that SAS jobs are most often constrained by disk speed, so compressing data sets is typically a good idea: it reduces disk usage (but increases CPU usage).&lt;/P&gt;
&lt;P&gt;As usual, cases vary, and for the particular example your showed, a space saving of 5% is probably not worth the CPU cost.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 19:50:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-compress-when-using-proc-import-in-SAS/m-p/723588#M224547</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-04T19:50:10Z</dc:date>
    </item>
  </channel>
</rss>

