<?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: how to read dat.z file and .sas7bdat.z file without unzipping it in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919174#M44410</link>
    <description>&lt;P&gt;Redirecting output is considered a basic UNIX skill and therefore not covered in the individual man pages.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 17:49:39 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-03-06T17:49:39Z</dc:date>
    <item>
      <title>how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919014#M44397</link>
      <description>&lt;P&gt;How to read&amp;nbsp;how to read dat.z file and .sas7bdat.z file without unzipping it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/folder1/haauto.prm.oct1995.dat.Z&lt;/P&gt;
&lt;P&gt;/folder2/avr1991.sas7bdat.Z&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide SAS code example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 22:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919014#M44397</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-03-05T22:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919016#M44398</link>
      <description>&lt;P&gt;You can find the answer yourself by going to the SAS doc:&amp;nbsp;&lt;A href="https://documentation.sas.com./doc/en/helpcenterwlcm/1.0/home.htm" target="_blank"&gt;https://documentation.sas.com./doc/en/helpcenterwlcm/1.0/home.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then search using the key word ZIP and you will find this:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n1dn0f61yfyzton1l2ngsa1clllr.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n1dn0f61yfyzton1l2ngsa1clllr.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is example code in the above link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 22:31:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919016#M44398</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-03-05T22:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919018#M44400</link>
      <description>&lt;P&gt;You cannot.&lt;/P&gt;
&lt;P&gt;You will need to uncompress both of those files before SAS will be able to read them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have permission to run operating system commands (and you are running SAS on Unix) you could use a PIPE to read the .dat file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile 'uncompress -c /folder1/haauto.prm.oct1995.dat.Z' pipe;
  input .....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But for the SAS dataset you will have to store the uncompressed file somewhere for SAS to be able to read it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 23:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919018#M44400</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-05T23:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919022#M44401</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;our operating system is Unix and I am interested by a pipe command to read the file directly.&lt;/P&gt;
&lt;P&gt;Could you please provide an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I the same line of though, it is possible to retreive a line into a dataset without unzipping it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 01:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919022#M44401</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-03-06T01:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919085#M44403</link>
      <description>&lt;P&gt;The .Z extension points to the use of the UNIX &lt;FONT face="courier new,courier"&gt;compress&lt;/FONT&gt; utility, which uses a different algorithm than the ZIP and gzip methods built into SAS. Therefore you have to use the external command for both files. The .dat.Z file can be read into SAS through a PIPE (if it is text), but the .sas7bdat.Z has to be uncompressed in place before SAS can use it as a dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 12:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919085#M44403</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-03-06T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919087#M44404</link>
      <description>&lt;P&gt;To read a compressed text file into SAS, use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile "uncompress -c path_to_your_file" pipe /* other options as needed */;
input ....;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2024 12:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919087#M44404</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-03-06T12:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919106#M44405</link>
      <description>&lt;P&gt;Hello Kurt,&lt;/P&gt;
&lt;P&gt;I have use the uncompress unix command directly to the terminal to see how the file react.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uncompress /folder1/aou1991.sas7bdat.z&lt;BR /&gt;un compress /folder1/belair.ontprime.sep92.dat.z&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after I am obtaining the two files below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/folder1/aou1991.sas7bdat&lt;/P&gt;
&lt;P&gt;/folder1/belair.ontprime.sep92.dat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first one is a SAS dataset, the second one look like a standard text file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In reality, the source of those two files are in folder2 (production environment) where I am not authorize to manipulate the files.&lt;/P&gt;
&lt;P&gt;So I moving these file from folder2 to p drive (windows env) then move from p to folder1 (unix env, but where I can do what I want)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I wonder if there is a way to uncompress a file from its source to a specific destination or in the work library ?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 13:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919106#M44405</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-03-06T13:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919110#M44406</link>
      <description>&lt;P&gt;The -c option directs the uncompress to send the result to stdout instead of a file, that's how my INFILE PIPE works.&lt;/P&gt;
&lt;P&gt;You also use the same option to create the file elsewhere:&lt;/P&gt;
&lt;PRE&gt;uncompress -c /folder1/source.Z &amp;gt; /folder2/target&lt;/PRE&gt;
&lt;P&gt;The original file will stay as it is.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 13:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919110#M44406</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-03-06T13:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919116#M44407</link>
      <description>&lt;P&gt;This unix command works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uncompress -c /folder1/aou2000.sas7bdat.Z &amp;gt; /folder2/aou2000.sas7bdat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am surprise that we don't see the above example into the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.computerhope.com/unix/uuncompr.htm" target="_blank"&gt;https://www.computerhope.com/unix/uuncompr.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible to send the uncompress file into the work library and if it is possible , how ?&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>Wed, 06 Mar 2024 14:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919116#M44407</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-03-06T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919121#M44408</link>
      <description>&lt;P&gt;If you only need to uncompressed files during your SAS session just write them into the WORK directory.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let work=%sysfunc(pathname(work));
data _null_;
  infile 
"cd &amp;amp;work
;uncompress -c /folder1/haauto.prm.oct1995.dat.Z  haauto.prm.oct1995.dat
;uncompress -c /folder2/avr1991.sas7bdat.Z  avr1991.sas7bdat
" pipe;
  input;
  put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can then use the DAT file from the &amp;amp;WORK directory and see the SAS dataset in the WORK library.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919121#M44408</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-06T15:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919141#M44409</link>
      <description>&lt;P&gt;Both version below are working:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let work=%sysfunc(pathname(work));

filename oscmd pipe "uncompress -c /folder1/aou2000.sas7bdat.Z &amp;gt; &amp;amp;work./aou2000.sas7bdat 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

%let work=%sysfunc(pathname(work));

filename oscmd pipe "cd &amp;amp;work. ; uncompress -c /folder1/aou2000.sas7bdat.Z &amp;gt; aou2000.sas7bdat 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919141#M44409</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-03-06T15:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to read dat.z file and .sas7bdat.z file without unzipping it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919174#M44410</link>
      <description>&lt;P&gt;Redirecting output is considered a basic UNIX skill and therefore not covered in the individual man pages.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 17:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-read-dat-z-file-and-sas7bdat-z-file-without-unzipping-it/m-p/919174#M44410</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-03-06T17:49:39Z</dc:date>
    </item>
  </channel>
</rss>

