BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
markready
Calcite | Level 5

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
markready
Calcite | Level 5

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

ChrisHemedinger
Community Manager

Look for it around the end of Sept 2017.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Reeza
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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