<?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 SAS dataset size in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329964#M73909</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently i have a problem where i have retreiving data from a DB (around 10G) and save it as Sas7dat , but doing so the file size is 100G almost 10 times of its original file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you guys have a solution for that ? thx in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname Folder 'C:\Sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql.....create table sqltable as ....&lt;/P&gt;&lt;P&gt;Select a,b,c from A.Oracle .&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data SAS.file;&lt;/P&gt;&lt;P&gt;set sqltable;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2017 15:33:41 GMT</pubDate>
    <dc:creator>SASNE</dc:creator>
    <dc:date>2017-02-04T15:33:41Z</dc:date>
    <item>
      <title>SAS dataset size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329964#M73909</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently i have a problem where i have retreiving data from a DB (around 10G) and save it as Sas7dat , but doing so the file size is 100G almost 10 times of its original file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you guys have a solution for that ? thx in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname Folder 'C:\Sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql.....create table sqltable as ....&lt;/P&gt;&lt;P&gt;Select a,b,c from A.Oracle .&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data SAS.file;&lt;/P&gt;&lt;P&gt;set sqltable;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 15:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329964#M73909</guid>
      <dc:creator>SASNE</dc:creator>
      <dc:date>2017-02-04T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329965#M73910</link>
      <description>&lt;P&gt;Most likely you have long character variables.&amp;nbsp;SAS stores all strings as fixed length, padded with spaces. Most database systems, like Oracle, have a VARCHAR() type that does not store the trailing spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do have long character variables then turning on COMPRESS dataset option will help. &amp;nbsp;But SAS will probably not compress as well as a true database engine could.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set the system option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options compress=yes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you could set it on the LIBNAME statement so that it is the default for all files written to that libref.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname folder 'my path' compress=yes;
....
create table folder.mytable as 
....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or use it as a dataset option instead to apply it to an individual dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create table folder.mytable (compress=yes) as ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that SAS uses a very simple compression algorithm. This means that for some tables the overhead added for implementing the compression will cause the table to be larger so check your SAS log. &amp;nbsp;When it writes the file it will note in the log the effect of the compression.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 15:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329965#M73910</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-04T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329996#M73922</link>
      <description>&lt;P&gt;Thx Tom, you help me a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think if i save it as csv as a datasource/DB instead of sas7dat works ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the drawback of doing so ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2017 01:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329996#M73922</guid>
      <dc:creator>SASNE</dc:creator>
      <dc:date>2017-02-05T01:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dataset size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329997#M73923</link>
      <description>&lt;P&gt;If you are going to do any analysis is SAS then if you saved that data as CSV instead of a SAS dataset then before &lt;STRONG&gt;any&lt;/STRONG&gt; action on the data by SAS you would have to read it into SAS and create a SAS data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whether saving the data as csv will work for other actions it really depends on what you may be attempting.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2017 03:14:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dataset-size/m-p/329997#M73923</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-05T03:14:00Z</dc:date>
    </item>
  </channel>
</rss>

