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-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!

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
  • 6 replies
  • 2034 views
  • 0 likes
  • 5 in conversation