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.
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"
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.