<?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 How to gzip a dataset in SAS EG？ in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-gzip-a-dataset-in-SAS-EG/m-p/875289#M345845</link>
    <description>My code is:&lt;BR /&gt;options compressed=yes;&lt;BR /&gt;libname public "path/to/public";&lt;BR /&gt;x "gunzip path/to/public/sale_21.sas7bdat.gz";&lt;BR /&gt;&lt;BR /&gt;proc append base=public.sale_21 data=public.new_21 force;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;x "gzip path/to/public/sale_21.sas7bdat";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At the beginning, there are two datasets under public folder: one compressed sale_21.sas7dbat.gz and one uncompressed new_21.sas7bdat&lt;BR /&gt;&lt;BR /&gt;I want to uncompressed sale_21 add data from new_21 to the end of sale_21, and then gzip it back. The public folder should still have two datasets.&lt;BR /&gt;&lt;BR /&gt;But after I run my program, it create another dataset, now my public folder has three files : one compressed sale_21.sas7bdat.gz and one uncompressed sale_21.sas7bdat and the original new_21.sasbdat. Why it created additional datasets? What should the codes be ??&lt;BR /&gt;&lt;BR /&gt;Thanks SO much!! Any help would be greatly appreciated!</description>
    <pubDate>Thu, 11 May 2023 16:59:06 GMT</pubDate>
    <dc:creator>qc1</dc:creator>
    <dc:date>2023-05-11T16:59:06Z</dc:date>
    <item>
      <title>How to gzip a dataset in SAS EG？</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-gzip-a-dataset-in-SAS-EG/m-p/875289#M345845</link>
      <description>My code is:&lt;BR /&gt;options compressed=yes;&lt;BR /&gt;libname public "path/to/public";&lt;BR /&gt;x "gunzip path/to/public/sale_21.sas7bdat.gz";&lt;BR /&gt;&lt;BR /&gt;proc append base=public.sale_21 data=public.new_21 force;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;x "gzip path/to/public/sale_21.sas7bdat";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At the beginning, there are two datasets under public folder: one compressed sale_21.sas7dbat.gz and one uncompressed new_21.sas7bdat&lt;BR /&gt;&lt;BR /&gt;I want to uncompressed sale_21 add data from new_21 to the end of sale_21, and then gzip it back. The public folder should still have two datasets.&lt;BR /&gt;&lt;BR /&gt;But after I run my program, it create another dataset, now my public folder has three files : one compressed sale_21.sas7bdat.gz and one uncompressed sale_21.sas7bdat and the original new_21.sasbdat. Why it created additional datasets? What should the codes be ??&lt;BR /&gt;&lt;BR /&gt;Thanks SO much!! Any help would be greatly appreciated!</description>
      <pubDate>Thu, 11 May 2023 16:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-gzip-a-dataset-in-SAS-EG/m-p/875289#M345845</guid>
      <dc:creator>qc1</dc:creator>
      <dc:date>2023-05-11T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to gzip a dataset in SAS EG？</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-gzip-a-dataset-in-SAS-EG/m-p/875293#M345848</link>
      <description>&lt;P&gt;Are you asking how the commands gzip and gunzip work?&lt;/P&gt;
&lt;P&gt;Shouldn't that be asked somewhere else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to see what messages the operating system is generating when you run those commands I recommend NOT using the X command.&amp;nbsp; Instead use a PIPE so your can read the responses and at least write them to the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile
   "gunzip path/to/public/sale_21.sas7bdat.gz &amp;amp;2&amp;gt;1"
    pipe
  ;
  input;
  put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If that does not work then just try opening a terminal window to the SAS server and running the commands directly in the terminal window and observe the behavior.&amp;nbsp; Perhaps your system has defined an alias for gzip that causes it to not replace the existing file but leave it behind.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 17:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-gzip-a-dataset-in-SAS-EG/m-p/875293#M345848</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-11T17:11:26Z</dc:date>
    </item>
  </channel>
</rss>

