<?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: Using SAS Only to unzip a big file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267721#M52936</link>
    <description>&lt;P&gt;I think you 9.3 for filename zip.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately it appears you're stuck with external utilities. You need to talk to you DB administrator.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2016 20:51:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-05-02T20:51:20Z</dc:date>
    <item>
      <title>Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267425#M52856</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know , if we can use sas only to unzip a big file :big_file.zip( more than 4 GB), without using an unix commands or windows command.&lt;/P&gt;
&lt;P&gt;- using sas only to unzip&lt;/P&gt;
&lt;P&gt;- do not use any unix or windows command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 16:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267425#M52856</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-04-30T16:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267441#M52859</link>
      <description>&lt;P&gt;Did you try using the FCOPY() command? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use the code below to copy a file named 'myfile.dat' from a zip file name 'myfile.zip'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in zip 'myfile.zip' member='myfile.dat' recfm=f lrecl=1;
filename out 'myfile.dat' recfm=f lrecl=1;
data _null_;
  rc=fcopy('in','out');
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 19:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267441#M52859</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-04-30T19:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267443#M52860</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;&amp;nbsp;This requires SAS 9.4+, correct?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 19:44:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267443#M52860</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-30T19:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267444#M52861</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;: Thank you very much.&lt;/P&gt;
&lt;P&gt;FCOPY() ?&amp;nbsp; Not so much&lt;/P&gt;
&lt;P&gt;To clarify my question.&lt;/P&gt;
&lt;P&gt;I have a zip file REP.zip ( with more than 5 GB) under sas 9.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/V1/V2/V3/REP.zip&lt;/P&gt;
&lt;P&gt;Inside REP.zip, I have&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REP.zip/DIR1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REP.zip/DIR2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ............&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...............&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REP.zip/DIRn&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; REP.ZIP/f1.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ...........&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; REP.zip/f20.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to unzip(=decmpress) a REP.ZIP in&amp;nbsp;&amp;nbsp; /Z1/Z2/Z3/REP&lt;/P&gt;
&lt;P&gt;Note : in REP.ZIP , I do not have any sas file, all of them are an external file.&lt;/P&gt;
&lt;P&gt;Thank you&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 19:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267444#M52861</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-04-30T19:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267445#M52862</link>
      <description>&lt;P&gt;SAS does't have unzip capabilities as far as I'm aware.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try Tom's code and it didn't work? If so, post the log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS can read text files from a zipped file, so if that's the reason for unzipping, maybe you can skip the unzip portion.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As with your other thread, this isn't a SAS issue, its the fact that your OS doesn't seem to have a tool to unzip the file. Have you tried command line with 7z? It's usually installed on many servers as well. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;And you've still never answered if you can unzip the file outside of SAS successfully.&lt;/STRONG&gt; &amp;nbsp;You may have an issue with your file.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 19:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267445#M52862</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-30T19:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267447#M52863</link>
      <description>&lt;P&gt;To reply to your question&lt;/P&gt;
&lt;P&gt;"If I have tried to unzip the file outside of SAS successfully."&lt;/P&gt;
&lt;P&gt;- Manually, yes, it works well successefully outside sas&lt;/P&gt;
&lt;P&gt;- By unix command ? not yet, but I will test it and I will&amp;nbsp; publish the answer.&lt;/P&gt;
&lt;P&gt;Here , my question is "Using SAS only to unzip a big file ".&lt;/P&gt;
&lt;P&gt;So, I want to use sas only to do this job( no unix and windows commands)&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 20:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267447#M52863</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-04-30T20:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267450#M52864</link>
      <description>&lt;P&gt;If you are using SAS 9.2 then the answer is that you need to either upgrade to SAS 9.4 or unzip the file outside of SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just adjust the code I posted to names of the files&amp;nbsp;you have. So if you have a zip file named '&lt;SPAN&gt;/V1/V2/V3/REP.zip' and you want the file inside of it that is named 'f1.txt' then just adjust the code to the use those names.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't know the names of the members then use the DOPEN() and DREAD() functions to find the names.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename myzip zip '/V1/V2/V3/REP.zip' ;
data members ;
  did=dopen('myzip');
  do memnum=1 to dnum(did);
    length member $256 ;
    member = dread(did,memnum);
     output;
  end;
  did=dclose(did);
run;
&lt;/CODE&gt;&lt;/PRE&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>Sat, 30 Apr 2016 20:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267450#M52864</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-04-30T20:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267451#M52865</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44053"&gt;@LineMoon&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here , my question is "Using SAS only to unzip a big file ".&lt;/P&gt;
&lt;P&gt;So, I want to use sas only to do this job( no unix and windows commands)&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;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What you want isn't possible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are workarounds, ie FCOPY, but not a direct unzip. That's a function for a utility, such as 7z, gzip or multiple other packages.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can read from a ZIP file, but not unzip the file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 20:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267451#M52865</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-30T20:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267458#M52867</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;: Thank you a lot.&lt;/P&gt;
&lt;P&gt;I will test it.&lt;/P&gt;
&lt;P&gt;Please, what 's about the output wanted. If I want to have this output&lt;/P&gt;
&lt;P&gt;/Z1/Z2/Z3/REP/dir1&lt;/P&gt;
&lt;P&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; /dir2&lt;/P&gt;
&lt;P&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; /dir3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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; /dirn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what's about the time of treatement&amp;nbsp; for a big file (more than 5 GB) ? It will be very quickly ?&lt;/P&gt;
&lt;P&gt;I know that's we can read a zip file in sas, but the aim ,here, is to have the output REP/dir1,......REP/dirn&lt;/P&gt;
&lt;P&gt;Thank you&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>Sat, 30 Apr 2016 21:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267458#M52867</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-04-30T21:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267464#M52869</link>
      <description>&lt;P&gt;If you know the file structure/names and can use FCOPY, create a macro to loop through and extract to where you want them. You can create folders using DCREATE.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2016 23:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267464#M52869</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-30T23:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267717#M52933</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;For Information: I have used "&lt;STRONG&gt;unzip the file outside of SAS " but it does not work.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 20:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267717#M52933</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-05-02T20:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267718#M52934</link>
      <description>&lt;P&gt;Then your issue isn't with SAS, it's with your external utility.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 20:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267718#M52934</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-02T20:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267720#M52935</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For information,&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;filename&lt;/SPAN&gt; myzip zip &lt;SPAN class="token string"&gt;'/V1/V2/V3/REP.zip'&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it does not work in sas 9.2 ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get&lt;/P&gt;
&lt;P&gt;ERROR :Invalide device type&lt;/P&gt;
&lt;P&gt;ERROR: error in the filename steatement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 20:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267720#M52935</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2016-05-02T20:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS Only to unzip a big file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267721#M52936</link>
      <description>&lt;P&gt;I think you 9.3 for filename zip.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately it appears you're stuck with external utilities. You need to talk to you DB administrator.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 20:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-Only-to-unzip-a-big-file/m-p/267721#M52936</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-02T20:51:20Z</dc:date>
    </item>
  </channel>
</rss>

