BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello,

 

I want set "d:\mylib"  as my sas temporary folder(WORK).  how to code it?

 

Thanks!

6 REPLIES 6
jklaverstijn
Rhodochrosite | Level 12

Hi @GeorgeSAS,

 

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

 

-WORK "D:\mylib"

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,

- Jan.

GeorgeSAS
Lapis Lazuli | Level 10

Jan,

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.

 

Thanks!

ballardw
Super User

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.

GeorgeSAS
Lapis Lazuli | Level 10

I know use this option can look the work location:

%let a = %sysfunc(getoption(work)); %put &a;

but is there any option can set work to d:\mylib?

BrunoMueller
SAS Super FREQ

Hi

 

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

 

Bruno

Ksharp
Super User
options user="D:\mylib" ;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2459 views
  • 0 likes
  • 5 in conversation