Sample 25215: Use the UNIX zcat command from within SAS® to read a compressed data file
Click on the Full Code tab for an example that demonstrates how to
use the UNIX zcat utility with FILENAME PIPE to read a compressed file.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
/* ZCAT dumps the compressed file's data to STDOUT, which is */
/* then read by the following DATA step. */
filename thedata pipe 'zcat $HOME/datafile.Z';
data _null_;
/* adjust LRECL and INPUT as needed */
infile thedata pad lrecl=80;
input theline $80.;
put theline=;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Type: | Sample |
Topic: | SAS Reference ==> DATA Step Common Programming Tasks ==> Reading and Writing External Data Data Management ==> Manipulation and Transformation ==> Compressing Data Files
|
Date Modified: | 2011-01-19 17:32:03 |
Date Created: | 2005-02-10 13:26:41 |
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled Solaris | n/a | n/a |
64-bit Enabled HP-UX | n/a | n/a |
ABI+ for Intel Architecture | n/a | n/a |
AIX | n/a | n/a |
HP-UX | n/a | n/a |
HP-UX IPF | n/a | n/a |
Linux | n/a | n/a |
Solaris | n/a | n/a |
Tru64 UNIX | n/a | n/a |
64-bit Enabled AIX | n/a | n/a |