SAS 9.4M7 on Windows Server 2012R2 and EG 8.3 on Windows 10
Up until recently, all users in our organisation had an H: home drive mapped onto Windows shared drives. We have now replaced these with OneDrive as part of our MS365 rollout. Unfortunately, when the infrastructure folk were removing the H: drive folders they found that some were being recreated with a "My SAS Files" subfolder. I suspected that this was due to SAS assigning SASUSER to this location. The sasv9.cfg had the following lines:
-SET MYSASFILES "?FOLDERID_Documents\My SAS Files\9.4"
-SASUSER "?FOLDERID_Documents\My SAS Files\9.4"
I don't quite understand what sort of reference "?FOLDERID_Documents" is but I guessed it was possibly pointing users to the UNC path of their old home drives. So I changed these lines to refer to locations in the users' profiles:
-SET MYSASFILES "%APPDATA%\My SAS Files\9.4"
-SASUSER "%APPDATA%\My SAS Files\9.4"
However, we are still seeing some of the old home drive locations being recreated. Does anyone have any ideas how this is happening? There are no other references to anything which could be the old home drives in the sasv9.cfg file or the various autoexec files used by Workspace Servers.
Thanks.
OK, I think I've got to the bottom of it, and it looks like it's the Office Add-In rather than SAS itself. There's an AMO setting "SAS results files location" which looks like it's set by default to a user's home drive. Where AMO was installed before the move to OneDrive that would be the UNC to their H: drive. So any time they opened Word, Excel or Powerpoint it tried to recreate that if it didn't exist.
Thanks @gwootton . I reckoned maybe ?FOLDERID_Documents did something like that. But I have replaced it with %appdata% in the sasv9.cfg file so it shouldn't be an issue anymore. We're still seeing the folders being recreated in a few cases.
Actually I have a suspicion that it's nothing to do with SAS itself, but a hang-over in their Windows account profiles. One of them doesn't ever use SAS (might have done in the past though).
You can easily run SAS code to see where those Windows settings are pointing.
For example make a FILEREF and ask SAS what location it ended up using.
3127 filename where '%APPDATA%' ; 3128 %put %sysfunc(pathname(where)); C:\Users\xxxx\AppData\Roaming 3129 filename where '?FOLDERID_Documents' ; 3130 %put %sysfunc(pathname(where)); C:\Users\xxxx\OneDrive - YYYY\Documents
Don't rule out that the users are doing something to create the directories/files.
OK, I think I've got to the bottom of it, and it looks like it's the Office Add-In rather than SAS itself. There's an AMO setting "SAS results files location" which looks like it's set by default to a user's home drive. Where AMO was installed before the move to OneDrive that would be the UNC to their H: drive. So any time they opened Word, Excel or Powerpoint it tried to recreate that if it didn't exist.
This documentation might be worth checking in your case
https://support.sas.com/kb/50/713.html
Also, if you use SAS Studio, check if you have specified any custom home directory in the option webdms.studioDataParentDirectory= inside ..\SASConfig\<Levn>\Web\WebAppServer\SASServerm_n\sas_webapps\sas.sasstudio.war\config\config.properties
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.