Help using Base SAS procedures

How to read compressed SAS Dataset

Reply
N/A
Posts: 0

How to read compressed SAS Dataset

I need read data from more than 10 big zipped SAS datasets, each of then is very big(15G), I can manually upzip them first but it is time consuming. I believe there must be a way to read the data without unzipping them. Who can help me with that?

The datasets are SAS data, e.g. client_200901.sas7bdat.gz. I tried Filename/Pipe/Zcat syntax but I failed.

Thank you very much for your help!
Trusted Advisor
Posts: 2,113

Re: How to read compressed SAS Dataset

SAS Datasets are considered direct access or random access (terminology varies in different platforms), which is why the pipe approach fails (it is predicated on sequential access). You might be able to convert the SAS datasets into SAS transport files (a sequential version of a SAS dataset) and then read it with a pipe, but I'm not sure.

Some Unix file systems (Solaris 10, for example) support OS level data compression which has storage use very similar to gzip. If your OS supports it, you might be able to get your Unix Admin to set the entire file system for compression. (Windows compression works similarly, but it looks like you are on a Unix box.) This is transparent to the SAS program.
N/A
Posts: 0

Re: How to read compressed SAS Dataset

Yes I am on Unix box. Can you elaborate a little more detail on how I can do to read the compressed data?

Thanks again!
Valued Guide
Posts: 2,175

Re: How to read compressed SAS Dataset

in windows explorer, a zip file can be displayed like a folder.
If the same effect could be achieved on that unix platform, perhaps a SAS libname statement could assign the zip file as a library using the sequential library engine
(but I'm not sure it even works in SAS on windows).

PeterC
Valued Guide
Posts: 2,175

Re: How to read compressed SAS Dataset

sorry
this technique
libname thatz v9tape 'path\zipfile.zip' ;
* addressing the zip with sequential library engine;
doesn't work in windows (it even rejected the documented sequential library engines tape and v9tape)

ballot anyone? Message was edited by: Peter.C
Trusted Advisor
Posts: 2,113

Re: How to read compressed SAS Dataset

Not much. Transport files use the XPORT engine. You'll have to take it from there.
N/A
Posts: 0

Re: How to read compressed SAS Dataset

Sorry, I found it hard to follow on how to do?
Ask a Question
Discussion stats
  • 6 replies
  • 1345 views
  • 0 likes
  • 3 in conversation