BookmarkSubscribeRSS Feed
HardyMThomas
Calcite | Level 5

While the WORK directory is set by a SAS Config file, which tends to be a sasv9.cfg file and is usually located where the application resides, I would like to redirect the WORK directory to a different location.

 

My config file (Windows machine) looks like this:

 

-WORK "!TEMP\SAS Temporary Files"

 

In EG, when I run

 

Proc Options option=work; run;

 

I can determine the Work directory location that was assigned from the Config file. I supect the !TEMP variable is a Windows environment variable, because , it seems to have resolved at runtime to:

 

WORK=C:\Users\hardt\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-6592-65acf2f5\contents\SAS Temporary Files\_TD1436_S210080_\Prc2
Specifies the libref or location of the Work library.

 

Clearly at run time, EG7.1 takes its setting from the sasV9.cfg file. How might I redirect EG7.1 to instead take settings from a config file of my chosing?

 

As I suspect, this issue may not be new, I hope someone can direct me to a resolved thread on this issue.

 

2 REPLIES 2
SASKiwi
PROC Star

The way to do this is to edit the SAS CONFIG file SAS9_usermods.cfg located in <SAS install dir>\Config\Lev1\SASApp and add the line:

-WORK "<SAS work drive and folder>\SASWORK"
HardyMThomas
Calcite | Level 5

Hi SASKiwi,

 

Thanks for suggesting a workaround.

 

I think your suggestion is spot on and thank you for that. Unfortunately, since I am unable to amend files in the SASHome directory, I need to work around the solution that you have suggested.

 

As I am new here, I have been reading the prior queries and suggested solutions on the various boards on here at SAS. Clearly, amending the config files appears to be the more commonly employed approach in the SAS community. However, I prefer to redirect the last call in the config chain via the command line config call to a final config file that also calls the original in the first line and amends specific settings on subsequent lines (i.e., located in my write access space). I think this approach, ensures that any updates to the Base version's config files are always dynamically employed, while overriding only those specific settings I might need to reset.

 

While I have done this for my SAS Base 9.4 version, and it runs perfectly with my over-rides, when I employ the editor in EG7.1, which I do for convenience alone, my config file over-rides do not function (naturally, since it applies only on a direct command line call of SAS9.4).

 

For example, when I edit a file in EG7.1, and submit that file for processing, EG7.1 calls SAS 9.4 for the compute processing, employing the default sas94.cfg file associated with SAS9.4 along the way. I need a way to redirect EG7.1 to employ my over-rides.

 

I hope that has added some further detail to my original post.

 

Thanks.

 

Hardy.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 559 views
  • 0 likes
  • 2 in conversation