<?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 Reading Gzip Files in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793556#M32760</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to read from a gzip SAS dataset into my program. I use the following, but I am not getting back any results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename rx_clm ZIP "/nfs/sasarch/MI/hedis/hedis_vendor/production/inovalon/my2020/inovalon/data/extract/rx/rx_clm_ext_202104.sas7bdat.gz" GZIP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my understanding after reading the post in SAS Support. Am I understanding incorrectly?&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 17:21:16 GMT</pubDate>
    <dc:creator>Jesusismygrace</dc:creator>
    <dc:date>2022-01-31T17:21:16Z</dc:date>
    <item>
      <title>Reading Gzip Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793556#M32760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to read from a gzip SAS dataset into my program. I use the following, but I am not getting back any results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename rx_clm ZIP "/nfs/sasarch/MI/hedis/hedis_vendor/production/inovalon/my2020/inovalon/data/extract/rx/rx_clm_ext_202104.sas7bdat.gz" GZIP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my understanding after reading the post in SAS Support. Am I understanding incorrectly?&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/10/10/reading-writing-gzip-files-sas/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 17:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793556#M32760</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2022-01-31T17:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Gzip Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793558#M32761</link>
      <description>&lt;P&gt;The FILENAME statement is just to create a pointer to the file, call a FILEREF.&amp;nbsp; To actually read from the file you need to have other code that references the fileref the FILENAME statement created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The article you linked to is about reading from a text file.&amp;nbsp; From the name that appears to be an actual SAS dataset, which is a binary file,&amp;nbsp; so you need to actually convert it into an uncompressed file for SAS to be able to use it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is code that will use FCOPY() function to copy it as a binary file into a file in the WORK directory.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename rx_clm ZIP 
  "/nfs/sasarch/MI/hedis/hedis_vendor/production/inovalon/my2020/inovalon/data/extract/rx/rx_clm_ext_202104.sas7bdat.gz" 
  GZIP   recfm=f lrecl=512
;
filename out "%sysfunc(pathname(work))/rx_clm_ext_202104.sas7bdat" recfm=f lrecl=512;

%let rc=%sysfunc(fcopy(rx_clm,out)); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From there you can work with it using normal SAS code.&amp;nbsp; For example to see what variables it has run PROC CONTENTS on it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=work.rx_clm_ext_202104;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;Edited: Fixed function to get location of work directory.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793558#M32761</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-31T18:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Gzip Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793565#M32762</link>
      <description>Thank you for your knowledgeable response and example. I ran you code and received the following error message:&lt;BR /&gt;&lt;BR /&gt;ERROR: The GDIR function referenced in the %SYSFUNC or %QSYSFUNC macro function is not found.&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793565#M32762</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2022-01-31T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Gzip Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793574#M32764</link>
      <description>&lt;P&gt;My mistake. %GDIR() is the name of my local macro to call that function. The actual function is PATHNAME().&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/793574#M32764</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-31T18:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Gzip Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/794546#M32864</link>
      <description>Thank you and have a great day</description>
      <pubDate>Fri, 04 Feb 2022 16:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-Gzip-Files/m-p/794546#M32864</guid>
      <dc:creator>Jesusismygrace</dc:creator>
      <dc:date>2022-02-04T16:14:23Z</dc:date>
    </item>
  </channel>
</rss>

