09-30-2015 01:09 AM
I got an error as follows while reading the file. Only I work on this file and I've closed it before running SAS program. Could someone guide me to overcome this error?
NOTE: The variable fname exists on an input data set, but was also specified in an I/O statement option. The variable will not be included on any output data set. Resource is write-locked by another user. File =/usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code = 0. ERROR: File is in use, /usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log.
09-30-2015 03:03 AM
SASApp_STPServer_2015-09-29_tmp_18208.log seems to be a log file automatically created by stp server. Why do you want to read/write it?
09-30-2015 03:50 AM - edited 09-30-2015 03:52 AM
Can you check which process is responsible for the lock? Afaik the STP-server and its sas-processes do not lock their log files.
09-30-2015 04:59 AM
My log file is in the below location. I did checked the process running in this folder and I could found below.
-bash-4.1$ lsof /usr/sas/tir/test/loganalysis/
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /root/.gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 6394 sas cwd DIR 253,2 4096 9718657 /apps/tir/test/loganalysis
lsof 10676 sas cwd DIR 253,2 4096 9718657 /apps/tir/test/loganalysis
lsof 10677 sas cwd DIR 253,2 4096 9718657 /apps/tir/test/loganalysis
Do I need to kill all the PID?