Help using Base SAS procedures

set up WORK folder

Reply
Regular Contributor
Posts: 241

set up WORK folder

Hello,

 

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

 

Thanks!

Super Contributor
Posts: 441

Re: set up WORK folder

Posted in reply to GeorgeSAS

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.

Regular Contributor
Posts: 241

Re: set up WORK folder

Posted in reply to jklaverstijn

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!

Super User
Posts: 11,343

Re: set up WORK folder

Posted in reply to GeorgeSAS

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.

Regular Contributor
Posts: 241

Re: set up WORK folder

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?

SAS Super FREQ
Posts: 708

Re: set up WORK folder

Posted in reply to GeorgeSAS

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

Super User
Posts: 10,035

Re: set up WORK folder

Posted in reply to GeorgeSAS
options user="D:\mylib" ;
Ask a Question
Discussion stats
  • 6 replies
  • 378 views
  • 0 likes
  • 5 in conversation