- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I need to change the WORK library folder location based on user. I'm wondering if anyone can help 🙂
We installed SAS on a server with roughly 3-5 people accessing the software. My boss wants her Work location to be in C: drive but the rest of the users in H: drive.
I opened the SASV9.CFG file but I can't seem to find a way to set the WORK location based on user. The best I could do is to use:
-WORK "H:\WORK\!USERNAME"
However, all of the data sets are stored in the H: drive.
Does anyone have any suggestions?
Thanks so much.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all! I actually found a solution that I haven't come across on this forum.
The Work library path can be set in the SAS properties:
Looks like this is a good option since we don't have to mess around any cfg or system file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Why? Work location is a termporary area only for the current session. If you need to store outputs/datasets etc. then setup an area and set libnames directly to the store area. Work is not the place for storing anything other than temporary elements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That depends, are they the best person to decide that, is it inline with company policy, is that secure etc.
"My boss wants me to chuck all these financial papers out of the window" - ok, good enough reason 🐵
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If I have written proof that he asked me to do that and I advised him not to, yes.
Anyway, my answer was tongue in cheek.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
- Look for the sasv9.cfg file in your language under Program Files\SASHome\SASFoundation\9.4\nls Directory
- Create a copy and edit it
- Adapt the line starting with '-WORK' with the path you want as for i.e. "-WORK "!TEMP"
- Create a shortcut to SAS and adapt the path to load your edited cfg file:
- "C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\TEMP\sasv9_mod.cfg"
- Save the shortcut and start SAS
It will significantly improve the working speed in case your admin set the default work path to a network drive and you remap to your local SSD
- Cheers -
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Oligolas. So your suggestion is to improve the working speed? I'm hoping to save the working data sets in different folders based on the server user.
E.g.
User ABC101 --> C:\Work
Other Users --> H:\Work
Do you think that's possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
afaik you can not change the work path at run time, I would rather work with the SAS libnames and educate the users to use a defined common library.
But you could use a Batch file for loading different shortcuts with different cfg files.
- Cheers -
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Using option.
options user='c:\temp\';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ehm yeah careful with that, it would save permanently any dataset created at run time which may not be what was wanted, depends on what your boss really intend to do.
- Cheers -
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The work-location can be set in any cfg-file with
-WORK "path"
SAS will create a sub-folder in the given directory with the name of the user and some more chars to make it unique. Afaik the last use of "-WORK" wins. So you use one "-WORK"-statement in sasv9_usermods.cfg with the default path.
With -config statement (in sasv9_usermods.cfg) another cfg-file can be loaded, so you need a cfg-file for each user: empty for those using the default path and with another "-WORK"-statement for your boss. Concatenating the file name in the config-statement didn't work, so we added a SET-statement in appservercontext_env_usermods.bat, like:
SET USER_WORK_CFG=PATH_TO_CFG\%username%.cfg
and used
-config "!USER_WORK_CFG"
in sasv9_usermods.cfg in SASApp directory.
I would not allow any user to have work on C-drive of a sas-server without having a very limiting quota management, especially if the config is also stored on C. If the work-datasets fill the available space on C, system-stability could be risked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all! I actually found a solution that I haven't come across on this forum.
The Work library path can be set in the SAS properties:
Looks like this is a good option since we don't have to mess around any cfg or system file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Wow that's great thanks for sharing! Apparently any other property can be customized this way 🙂
- Cheers -