04-28-2015 12:15 PM
Our SAS use work folder as default, if we create a data set such as :
then the one data set will be created in WORK folder.
My question is if I have another folder named mylib(libname mylib "c:\myfolder1", Is there any SAS code that I can do to make this folder to default folder as WORK? and if it works ,when I create the data set named ONE use the code above it will be created in mylib folder by default.
04-28-2015 12:24 PM
Look at the USER option and/or USER libname.
Note that if you do this you can still reference tables in the WORK folder by using a two level name. (WORK.ONE)
04-28-2015 01:28 PM
Some warnings about using a USER library:
1) USER libraries persist from session to session, which may or may not be a good thing depending on how you work.
2) It is your responsibility to clean it up. You can end up with thousands of datasets which for some operations might impact performance, especially opening the library in the SAS Explorer.
3) If you reuse dataset names you will overwrite existing datasets of the same name. So be very conscious of which datasets are pretty temporary and you don't care if they get replaced and those that you intend to keep. Actually if you intend to keep them for any period of time you should consider other permanent libraries.
04-28-2015 02:16 PM
The user librarie is often locasted at \sashome or "my docuements" often having space limitations and being managed by others. They should only be used by exception not as default.