BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

hello everyone,

Our SAS use work folder as default, if we create a data set such as :

data ONE;

x=1;

run;

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.

Thanks

3 REPLIES 3
Tom
Super User Tom
Super User

Look at the USER option and/or USER libname.

http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/viewer.htm#userlib.htm

Note that if you do this you can still reference tables in the WORK folder by using a two level name. (WORK.ONE)

ballardw
Super User

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.

jakarman
Barite | Level 11

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.

---->-- ja karman --<-----

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
  • 3 replies
  • 813 views
  • 1 like
  • 4 in conversation