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

I have a Winzip compressed file which I want to read in automatically in a SAS program flow using SAS decompression engines. I've tried a couple of import, compression commands as well as 7zip.exe, none of which have worked. I am working on a Windows XP platform.

Here's the compressed file name:  EPS_INFORMACION.zip and the file zipped up inside is an Excel *.xlsx file named EPS_Data.xlsx.

Any suggestions?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
Tom
Super User Tom
Super User

A self-extracting file would have the extension of EXE instead of ZIP, but you should still be able to extract it using UNZIP, 7ZIP or even the ZIP engine in SAS.  If you are getting errors then perhaps it is corrupted.  Perhaps some one moved it between a Unix and Windows system as if it was a text file instead of a binary file?  Note that it does not make sense to ZIP an XLSX file since the XLSX file itself is just a ZIP archive with a different extension.

xtc283x
Quartz | Level 8

Tom, thanks for your reply. Just to be clear, I'm not interested in extracting the file and setting it up for uncompressed, flat file-like access. Rather, I want to leave it in its compressed state and access it in real program run-time. Given that clarification, what would the SAS syntax look like?

xtc283x
Quartz | Level 8

Uh oh! I was afraid of that....thanks.

Tom
Super User Tom
Super User

You would need to do it in two steps in SAS. First extract it from the ZIP archive and then use PROC IMPORT or LIBNAME engine to convert the XLSX file into data.  But again, there is no advantage in storing the XLSX file int a ZIP archive since the contents of the XLSX file is already compressed.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 1468 views
  • 0 likes
  • 3 in conversation