Read UNIX gz archive in PC SAS

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Read UNIX gz archive in PC SAS

I am using 64-bit PC SAS 9.4 on Windows 10.  I am trying to read a single member from a .gz archive that was created on a UNIX machine.  The following SAS code

filename zipped ZIP 'E:/WISC_TAS_20060103.csv.gz';
data testin;
infile zipped(WISC_TAS_20060103.csv)
firstobs=2 dsd;
input RIC $ ;
run;

 

produces the error: ERROR: The file "E:\WISC_TAS_20060103.csv.gz" exists and is not a zip file. The output file
must be a zip file.

 

I used 7zip to extract the .csv file and then used 7zip to create a new archive.  The following code reads that file just fine:

filename zipped ZIP 'E:/WISC_TAS_20060103.zip';
data testin;
infile zipped(WISC_TAS_20060103.csv)
firstobs=2 dsd;
input RIC $ ;

run;

 

Is there a way to get the ZIP utility to recognize the unix zip file?

 


Accepted Solutions
Solution
‎08-01-2017 03:13 PM
Community Manager
Posts: 2,954

Re: Read UNIX gz archive in PC SAS

Posted in reply to markready

FILENAME ZIP doesn't currently support .gz files, but that's coming.  Support for reading/creating .gz files (gzip compatible) will be part of SAS 9.4 Maintenance 5.

View solution in original post


All Replies
Solution
‎08-01-2017 03:13 PM
Community Manager
Posts: 2,954

Re: Read UNIX gz archive in PC SAS

Posted in reply to markready

FILENAME ZIP doesn't currently support .gz files, but that's coming.  Support for reading/creating .gz files (gzip compatible) will be part of SAS 9.4 Maintenance 5.

New Contributor
Posts: 2

Re: Read UNIX gz archive in PC SAS

Posted in reply to ChrisHemedinger

Thanks for the quick response.  Any idea when maintenance release 5 will be out?

Community Manager
Posts: 2,954

Re: Read UNIX gz archive in PC SAS

Posted in reply to markready

Look for it around the end of Sept 2017.

Super User
Posts: 19,815

Re: Read UNIX gz archive in PC SAS

Posted in reply to markready

If you can use X command you can use 7zip to extract the file. Not optimal obviously. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 245 views
  • 1 like
  • 3 in conversation