06-06-2016 10:48 AM
There are a few approaches depending on the type of installation. If this is your nown machine/laptop then you could edit the SAS config file, located in <SAS Home>/SASFoundation/9.x/nls/en/sasv9.cfg. Add the line
Other options are:
Start sas.exe with the -WORK option
Edit the sasv9_usermods.cfg in the SAS Config directory (preferred if this is a multiuser environment)
So if you give us a bit more detail on your installation and configuration we may be able to narrow this down.
Also there is an article on support.sas com titled "Checking or Changing the SAS WORK" library".
Hope this helps,
06-06-2016 11:30 AM
Thank you very much for your help. acturally I want to make this change just in the current SAS seccsion. I want to find a SAS code or SAS option that can make a quick change and also easy to change back by using SAS code or SAS options ,at the same time.other SAS programs will not be affected.
06-06-2016 11:40 AM
Unless ALL of your other programs explicitly specify WORK as the default library I think you are not going to find a solution that meats all of your needs.
You can use the System Option USER to specify a default library but ALL references not using WORK will assume all datasets without a specific library are in the USER library.
06-06-2016 12:20 PM
Check the doc for the WORK System option http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#n1qr5dmzagn9krn1lt...
Look at the Valid in: it will tell you that this option can only be used at the start of SAS, it can not be changed once SAS has started.
|Valid in:||configuration file, SAS invocation, SASV9_OPTIONS environment variable|