I'm running a batch file with the following command to clean up logs and log the information to a text document on user workstations. Workstations are Windows 10, and we are running SAS Foundation 9.4m5.
"C:\Program Files\SASHome\SASFoundation\9.4\cleanwork.exe" /alllogs /verbose >>%logfile%
In my log I'm finding most of the entries say the process is not active and the file is removed, but sometimes it shows the following:
ERROR: C:\Users\user\AppData\Roaming\SAS\LOGS\sasjava.3f74.46f5e1d2.log : The process cannot access the file because it is being used by another process.
REMOVED: C:\Users\user\AppData\Roaming\SAS\LOGS\sasjava.3f74.46f5e1d2.log
I've checked and this file looks like it was not removed, is there a way I can make the process report correctly about removing or not removing a log file when it is in use? My other job for the temporary directories appears to be reporting correctly.
Thanks,
Carmen
it sounds like you might be trying to write the results of cleanwork out to a log file, but that cleanwork is in fact trying to remove that same log file ?
Hi Thanks for the response @34reqrwe. My log file does not have 'java' in the name. My question is just about the fact that it reports a log file is in use, and then it reports that the log file has been removed.
I'd rather it not say that it is removed when it is not - it will cause confusion for my users. I spot checked a couple files and they were not removed as reported.
-Carmen
Have you checked when the file was created? . It is possible that the file is being removed , and then recreated with the same name.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.