Desktop productivity for business analysts and programmers

Import to SAS multiple folders with multiple zipped fies

Reply
Contributor
Posts: 69

Import to SAS multiple folders with multiple zipped fies

I have SAS EG 7.1 on my machine. I have been given read access only to a shared drive. In this shared drive there are multiple folders. Within these multiple folders and multiple zipped files. I need these zipped files imported into my SAS EG which runs through a SAS Server that is Unix based. I have tried all sorts of unzipping or import codes and everything comes back stating I insufficient rights. I can move the files to my local machine and right now it is saying it will take 4 hours to move them. I have already tested the exact same code but on my local machine with one zipped and it works. I do not get the error. I believe the problem is I have read access only to this shared drive. Can anyone confirm if this is the case? If you must have write access in order to import zipped files to your SAS EG through a SAS Server.

Esteemed Advisor
Esteemed Advisor
Posts: 7,217

Re: Import to SAS multiple folders with multiple zipped fies

SAS does not work with zipped files.  To use them I suppose your system is trying to unpack the zip - which you can't do as you only have read access.  Your best bet is to copy them locally, even if you do get write access, if it is taking 4  hours to move compressed files, imagine how long it would take to move uncompressed files.

Contributor
Posts: 69

Re: Import to SAS multiple folders with multiple zipped fies

Thanks. RW9, what if I write a libname statement to point to the Sharedrive so I can see the zipped files in the tree and then try extracting that way. Do you think that would work? I have all these people in my org saying just write a libname statement to point to the shared drive and I have tried and it does not find the path I am putting in.

Esteemed Advisor
Esteemed Advisor
Posts: 7,217

Re: Import to SAS multiple folders with multiple zipped fies

Yes, its nothing to do with a libname statement.  A libname statement sets a library pointer to a network path sure, but you will only see SAS files - datasets, catalogs, programs.  The problem lies in the fact that the files you are dealing with are Zipped - this is a proprietary binary file format which compresses other files.  These files need to be uncompressed for other applications to use them.

Trusted Advisor
Posts: 1,056

Re: Import to SAS multiple folders with multiple zipped fies

You can definitely read .zip files, using the ZIP option of the filename statement. I've read .zip files using this. However, I can't do an experiment to see if you're prevented from reading a write-protected zip. Hopefully, someone else can.

 

Tom

Ask a Question
Discussion stats
  • 4 replies
  • 270 views
  • 0 likes
  • 3 in conversation