<?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: unzip sas7bdat.gz file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470865#M285689</link>
    <description>&lt;P&gt;I think you need to add GZIP to the filename statement that refers to the .gz file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code worked for me in SAS University Edition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename target "/folders/myfolders/GZIP/pins_vdj_ann.sas7bdat";
filename fromzip ZIP "/folders/myfolders/GZIP/pins_vdj_ann.sas7bdat.gz" GZIP;

data _null_;
	infile fromzip lrecl=256 recfm=F length=length eof=eof unbuf;
	file target lrecl=256 recfm=N;
	input;
	put _infile_  $varying256. length;
	return;
  eof:
    stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Chris Hemedinger provided the syntax to expand the data set in a comment on &lt;A href="https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/" target="_blank"&gt;Reading and writing GZIP files with SAS&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jun 2018 13:55:35 GMT</pubDate>
    <dc:creator>SuzanneDorinski</dc:creator>
    <dc:date>2018-06-17T13:55:35Z</dc:date>
    <item>
      <title>unzip sas7bdat.gz file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470862#M285688</link>
      <description>&lt;P&gt;I tried all the solutions on the internet and failed. Hope you could help me with the case.&lt;/P&gt;&lt;P&gt;The url link of the data:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://scholar.rhsmith.umd.edu/sites/default/files/sbrown/files/pins_vdj_ann.sas7bdat.gz?m=1467366849" target="_blank" rel="nofollow"&gt;http://scholar.rhsmith.umd.edu/sites/default/files/sbrown/files/pins_vdj_ann.sas7bdat.gz?m=1467366849&lt;/A&gt;&lt;BR /&gt;My code:&lt;BR /&gt;libname pinlib "E:\data\PIN_Stephen_Brown";&lt;BR /&gt;filename target "%sysfunc(pathname(pinlib))/test.sas7bdat";&lt;BR /&gt;filename fromzip ZIP "E:\data\PIN_Stephen_Brown\test.sas7bdat.gz";&lt;BR /&gt;data _null_;&lt;BR /&gt;infile fromzip&lt;BR /&gt;lrecl=256 recfm=F length=length eof=eof unbuf;&lt;BR /&gt;file target lrecl=256 recfm=N;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_ $varying256. length;&lt;BR /&gt;return;&lt;BR /&gt;eof:&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;BR /&gt;It reports the error message as :&lt;BR /&gt;ERROR: The file "E:\data\PIN_Stephen_Brown\test.sas7bdat.gz" exists and is not a zip&lt;BR /&gt;file. The output file must be a zip file.&lt;BR /&gt;I appreciate your help very much if you could help me with this case.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Your comment is awaiting moderation.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 13:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470862#M285688</guid>
      <dc:creator>zilong567</dc:creator>
      <dc:date>2018-06-17T13:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: unzip sas7bdat.gz file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470865#M285689</link>
      <description>&lt;P&gt;I think you need to add GZIP to the filename statement that refers to the .gz file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code worked for me in SAS University Edition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename target "/folders/myfolders/GZIP/pins_vdj_ann.sas7bdat";
filename fromzip ZIP "/folders/myfolders/GZIP/pins_vdj_ann.sas7bdat.gz" GZIP;

data _null_;
	infile fromzip lrecl=256 recfm=F length=length eof=eof unbuf;
	file target lrecl=256 recfm=N;
	input;
	put _infile_  $varying256. length;
	return;
  eof:
    stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Chris Hemedinger provided the syntax to expand the data set in a comment on &lt;A href="https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/" target="_blank"&gt;Reading and writing GZIP files with SAS&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 13:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470865#M285689</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-06-17T13:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: unzip sas7bdat.gz file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470878#M285690</link>
      <description>What version of SAS do you have? Support for GZ was only added recently, before that it supported WinZip only. &lt;BR /&gt;&lt;BR /&gt;The link in @SuzanneDorinkski has the details.</description>
      <pubDate>Sun, 17 Jun 2018 15:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/unzip-sas7bdat-gz-file/m-p/470878#M285690</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-17T15:35:56Z</dc:date>
    </item>
  </channel>
</rss>

