BookmarkSubscribeRSS Feed
LineMoon
Lapis Lazuli | Level 10

Hello,

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" ?

Thank you

 

 

 

3 REPLIES 3
Kurt_Bremser
Super User

Plainly, no.

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.

See SAS 9.4 Companion for UNIX Environments, LIBNAME statement

 

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, I believe currently its only possible to create ZIP files from SAS, not read from them:

http://support.sas.com/documentation/cdl/en/odsug/65308/HTML/default/viewer.htm#p19kppnlyy01n7n18jcf...

 

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1133 views
  • 3 likes
  • 4 in conversation