Architecting, installing and maintaining your SAS environment

Adding Username to WORK Folder

Reply
Contributor
Posts: 24

Adding Username to WORK Folder

I'd like to add the Username associated with the Work folder on our server so we can quickly identify the user. Is this possible and if so how can it be done? 

 

Our current folder format is like - _TD9904_CSSSASAPP_

 

This is a Windows Server 2012R2 Environment. We use Eminer and EGuide in our Work folders.

 

 

Thanks! 

Super User
Posts: 6,936

Re: Adding Username to WORK Folder

AFAIK, there is no option to influence the automatically created directory name. But you could set up paths for the individual users in your physical work location and put that into the -work commandline option:

path_to_sas\sas.exe -work c:\temp\%username%
---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 6,936

Re: Adding Username to WORK Folder

I need to add to my previous post: if you use the cleanwork utility to get rid of orphaned work directories, you must now write a script that runs cleanwork individually for every username subdirectory.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 5

Re: Adding Username to WORK Folder

That is true, But we are a small SAS shop and all of my users are not logging in at night so I have that clean up written into by metadata backup job that just deletes all folders beyond  "LEV1\SASUser". I've had this setup working for 10 years now. It works great for us.

Occasional Contributor
Posts: 5

Re: Adding Username to WORK Folder

I modified the SASv9_usermods.cfg file located in   .....SAShome...\Lev1\SASApp    folder and added:

 

/* Setup the MYSASFILES system variable                         */
-SET MYSASFILES "D:\SASUser\Lev1\SASUser\!username"

 

This way all of my users folder are in one central location so I can find them quickly and also, it's easy to clean them up this way.(when users sessions are interrupted). I have a job that cleans the folders up every night)

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 116 views
  • 0 likes
  • 3 in conversation