03-10-2016 03:41 PM
Is it possible to allocate a sas library - in sas 9.2 - from a zip file.
likes this :
Libname lib "c:/toto/dir.zip" ; ?
is it the avantage or not ?
If I have a dirctory dir1 in dir.zip, is it also to do : libname lib1 " /dir1" ?
03-11-2016 02:56 AM
Standard libraries in UNIX need to be directories in the filesystem. To access a.zip file as if it was a directory, one would need a special engine; no such engine is present in SAS.
If you have a tool that lets you mount a .zip file into the UNIX filesystem (as if it was a physical disk or a network resource), you could use that (X statement) first and then define the libname. Don't know if such a tool exists.
Also keep in mind that writing to such a library would consume ample resources. I consider it better and much more performant to unpack the zipped contents, run SAS, and then re-zip the data.
03-11-2016 05:20 AM
Yes, I believe currently its only possible to create ZIP files from SAS, not read from them:
As I am sure your data will be stored in a some sort of versioned controlled, access restricted system however, so you would need to extract all the data in to that system first before accessing it from SAS.