<?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: How do I zip a SAS data set? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485525#M15128</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That first line should be a C, then a colon, then a backslash, then "Folder."&amp;nbsp; I was trying to make it the simplest possible situation.&amp;nbsp; I guess they sometimes turn stuff with a colon into an emoji.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 17:01:22 GMT</pubDate>
    <dc:creator>n6</dc:creator>
    <dc:date>2018-08-09T17:01:22Z</dc:date>
    <item>
      <title>How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485523#M15127</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a folder named C:|Folder.&amp;nbsp; And I put a SAS dataset in it named ABC.sas7bdat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The person I created it for wants to send it over email but it's too big so I've been tasked with zipping it.&amp;nbsp; I thought this would be simple but fruistratingly it is not.&amp;nbsp; (Is "frustratingly" a word?&amp;nbsp; It is now.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought I'd be able to just right click the dataset or perhaps recreate it while adding an option to the DATA statement.&amp;nbsp; But those don't work and instead my research is bringing up all sorts of SAS code and I'm trying them but while some steps work others do not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas for a simple way to do this are greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 16:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485523#M15127</guid>
      <dc:creator>n6</dc:creator>
      <dc:date>2018-08-09T16:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485525#M15128</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That first line should be a C, then a colon, then a backslash, then "Folder."&amp;nbsp; I was trying to make it the simplest possible situation.&amp;nbsp; I guess they sometimes turn stuff with a colon into an emoji.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 17:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485525#M15128</guid>
      <dc:creator>n6</dc:creator>
      <dc:date>2018-08-09T17:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485586#M15129</link>
      <description>&lt;P&gt;When you say "those don't work", what happened? Where did zipping a file go wrong? keep in mind that zipping is a task executed in the operating system, in your case most likely in the Explorer. There is little reason why this wouldn't work. I can think of the file being locked by SAS (eg. open in a table viewer or a running proc) or Windows not granting you the required access. Please enlighten us!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS a dataset can be compressed with roughly similar compression factor but keeping the structure in tact and directly accessible by SAS. Use the COMPRESS=YES (or COMPRESS=BINARY) option when creating or copying the table. Have a look at &lt;A href="http://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#n014hy7167t2asn1j7qo99qv16wa.htm" target="_blank"&gt;the doc&lt;/A&gt; for more details about dataset compression. The resulting .sas7bdat file should be considerably smaller, although your mileage may vary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485586#M15129</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-08-09T20:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485589#M15130</link>
      <description>&lt;P&gt;I finally figure it out shortly before I got the e-mail telling me that you posted.&amp;nbsp; In a couple places I used a semicolon instead of a colon because a colon yields an emoji.&amp;nbsp; I think you can put any name in place of ClinicalProjectZip but that's what they used in the documentation I was using to try to figure it out, so I kept it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS PACKAGE (ClinicalProjectZIP) OPEN nopf; &lt;BR /&gt;ODS PACKAGE (ClinicalProjectZIP) ADD file = "C;\ABC.sas7bdat"; &lt;BR /&gt;ODS PACKAGE (ClinicalProjectZIP) PUBLISH archive &lt;BR /&gt; PROPERTIES (archive_name = "ABC.zip" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; archive_path = "C;\" ); &lt;BR /&gt;ODS PACKAGE (ClinicalProjectZIP) CLOSE; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But yeah, this would be much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname xyz "C;\";&lt;/P&gt;
&lt;P&gt;data xyz.abc_compressed (compress=yes);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set xyz.abc;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I figured something like that must exist but I didn't know what it was.&amp;nbsp; I looked at the documentation for the DATA statement but I was only looking for a ZIP option and thus I overlooked the COMPRESS option.&amp;nbsp; That said though, I just made it with COMPRESS and it looks like it's still about half the size of the original.&amp;nbsp; I guess that's all the more it gets compressed.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485589#M15130</guid>
      <dc:creator>n6</dc:creator>
      <dc:date>2018-08-09T20:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485590#M15131</link>
      <description>&lt;P&gt;Glad to hear I pointed you in the right direction. If your dataset contains predominantly numeric data you may obtain a higher compression rate by using BINARY compression. Give this a try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xyz "C;\";

data xyz.abc_compressed (compress=binary);

   set xyz.abc;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note how I added code: use the running man or the {i} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may get even more compression by using a Windows zip utility. It is still unclear to us why that wouldn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485590#M15131</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-08-09T20:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I zip a SAS data set?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485592#M15132</link>
      <description>&lt;P&gt;hang on, I just spotted a possible typo in your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS PACKAGE (ClinicalProjectZIP) ADD file = "C;\ABC.sas7bdat";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The semicolon should be a colon:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS PACKAGE (ClinicalProjectZIP) ADD file = "C:\ABC.sas7bdat";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe that's your problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-zip-a-SAS-data-set/m-p/485592#M15132</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-08-09T20:48:10Z</dc:date>
    </item>
  </channel>
</rss>

