<?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: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/906125#M44022</link>
    <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290946"&gt;@bhca60&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;1.When you compressed the file using the command (&lt;STRONG&gt;x "gzip /abc/123/gdr/file1.sas7bdat"&lt;/STRONG&gt;;). a new file &lt;STRONG&gt;file1.sas7bdat.gz&lt;/STRONG&gt; would be created at the location &lt;STRONG&gt;/abc/123/gdr &lt;/STRONG&gt; and the orignal dataset file.sas7bdat would be deleted.&lt;/P&gt;
&lt;P&gt;2. Subsequently you are creating the libref &lt;STRONG&gt;get&amp;nbsp;&lt;/STRONG&gt; (&lt;STRONG&gt;libname get "/abc/carib/process/data";&lt;/STRONG&gt;). This location does not contain the dataset &lt;STRONG&gt;fi1e1.sas7bdat.&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; This is the reason you see the error message (&lt;STRONG&gt;ERROR: FILE1 does not exist.&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. The file needs to be&amp;nbsp; copied to the location pointed by your libref. &lt;/STRONG&gt;You can use the code by &lt;STRONG&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/STRONG&gt; OR &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp; to perform this action..&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2023 21:04:07 GMT</pubDate>
    <dc:creator>Sajid01</dc:creator>
    <dc:date>2023-12-04T21:04:07Z</dc:date>
    <item>
      <title>Had to zip data files to save space but doesn't appear to be able to read data from the zipped files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904180#M43991</link>
      <description>x "gzip /abc/123/gdr/file1.sas7bdat";&lt;BR /&gt;&lt;BR /&gt;libname get "/abc/carib/process/data";&lt;BR /&gt;&lt;BR /&gt;data test;&lt;BR /&gt;set get.file1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;file1.sas7bdat.gz is now the name of the file but when doing this test run, I am getting ERROR: FILE1 does not exist.&lt;BR /&gt; &lt;BR /&gt;Is there something I have to do to get this to be read as if it were an unzipped file? I am&lt;BR /&gt;Trying to save space which is why I need it to stay zipped unless there are other solutions.</description>
      <pubDate>Wed, 22 Nov 2023 06:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904180#M43991</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2023-11-22T06:18:15Z</dc:date>
    </item>
    <item>
      <title>Had to zip data files to save space but doesn't appear to be able to read data from the zipped files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904173#M43994</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x "gzip /abc/123/gdr/file1.sas7bdat";

libname get "/abc/carib/process/data";

data test;
set get.file1;
run;&lt;BR /&gt;&lt;BR /&gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;file1.sas7bdat.gz is now the name of the file but when doing this test run, I am getting ERROR: FILE1 does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there something I have to do to get this to be read as if it were an unzipped file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 01:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904173#M43994</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2023-11-22T01:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904183#M43992</link>
      <description>&lt;P&gt;Yes, you need to unzip the file.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 06:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904183#M43992</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-11-22T06:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904184#M43993</link>
      <description>&lt;P&gt;As an option you can consider using those two macros from the &lt;A title="https://github.com/SASPAC/baseplus" href="https://github.com/SASPAC/baseplus" target="_self"&gt;BasePlus&lt;/A&gt; package:&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp;&lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#ziplibrary-macro" target="_blank"&gt;https://github.com/SASPAC/baseplus/blob/main/baseplus.md#ziplibrary-macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;&lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#unziplibrary-macro" target="_blank"&gt;https://github.com/SASPAC/baseplus/blob/main/baseplus.md#unziplibrary-macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The first can sip the library content for you (each separate file as a separate zip)&lt;/P&gt;
&lt;P&gt;The second allows you to unzip the content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 07:01:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904184#M43993</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-11-22T07:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904186#M43995</link>
      <description>&lt;P&gt;Could you share the complete log of the code?&lt;/P&gt;
&lt;P&gt;Have you verified that file1.sas7bdat exists in the directory used in the libname statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 07:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904186#M43995</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-11-22T07:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904188#M43996</link>
      <description>&lt;PRE&gt;gunzip &amp;lt;file.gz&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 07:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904188#M43996</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-11-22T07:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904238#M43997</link>
      <description>&lt;P&gt;SAS will not read a .gz file as if it was a .sas7bdat file.&amp;nbsp; You will first have to uncompress it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could expand it into the WORK directory and use it from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So let's assume you have a file named&amp;nbsp;&lt;SPAN&gt;/abc/123/gdr/file1.sas7bdat.gz.&amp;nbsp; You could do something like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gzipfile=/abc/123/gdr/file1.sas7bdat.gz;
%let dsname=%sysfunc(lowcase(%scan(&amp;amp;gzipfile,-3,/.)));
data _null_;
  infile "gzip -o -d &amp;amp;gzipfile &amp;gt; %sysfunc(pathname(work))/&amp;amp;dsname..sas7bdat"  pipe;
  input;
  put _infile_;
run;

proc contents data=&amp;amp;dsname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 15:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904238#M43997</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-22T15:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904250#M43998</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*unzip gzip file using SAS commands, requires 9.4M5+;
filename target "/abc/carib/process/data/file1.sas7bdat" ;
filename fromzip ZIP "/abc/123/gdr/file1.sas7bdat.gz" GZIP;
 
data _null_;   
   infile fromzip;
   file target ;
   input;
   put _infile_ ;
run;

libname get "/abc/carib/process/data/";

data test;
set get.file1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904250#M43998</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-22T16:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904251#M43999</link>
      <description>&lt;P&gt;I would go with "binary" copying:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename target "/abc/carib/process/data/file1.sas7bdat" lrecl=1 recfm=n;
filename fromzip ZIP "/abc/123/gdr/file1.sas7bdat.gz" GZIP lrecl=1 recfm=n;
 
data _null_;   
  rc = fcopy('fromzip','target');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:01:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/904251#M43999</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-11-22T16:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Had to zip data files to save space but doesn't appear to be able to read data from the zipped f</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/906125#M44022</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290946"&gt;@bhca60&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;1.When you compressed the file using the command (&lt;STRONG&gt;x "gzip /abc/123/gdr/file1.sas7bdat"&lt;/STRONG&gt;;). a new file &lt;STRONG&gt;file1.sas7bdat.gz&lt;/STRONG&gt; would be created at the location &lt;STRONG&gt;/abc/123/gdr &lt;/STRONG&gt; and the orignal dataset file.sas7bdat would be deleted.&lt;/P&gt;
&lt;P&gt;2. Subsequently you are creating the libref &lt;STRONG&gt;get&amp;nbsp;&lt;/STRONG&gt; (&lt;STRONG&gt;libname get "/abc/carib/process/data";&lt;/STRONG&gt;). This location does not contain the dataset &lt;STRONG&gt;fi1e1.sas7bdat.&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; This is the reason you see the error message (&lt;STRONG&gt;ERROR: FILE1 does not exist.&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. The file needs to be&amp;nbsp; copied to the location pointed by your libref. &lt;/STRONG&gt;You can use the code by &lt;STRONG&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/STRONG&gt; OR &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp; to perform this action..&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 21:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Had-to-zip-data-files-to-save-space-but-doesn-t-appear-to-be/m-p/906125#M44022</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2023-12-04T21:04:07Z</dc:date>
    </item>
  </channel>
</rss>

