I was trying to read the file to create a table in SAS and I got error as follows while I read.
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
I've closed this file before I read the file and I'm not sure why I'm getting this error.
How to overcome this error? How to check which process is responsible for the lock?
This is for a SAS 9.4 :
HOME=/opt/sas/9.4/SASFoundation/9.4/
You should have config files for share, if you dont
Go to $HOME/utilities/bin
If you dont have a directory called files create it with owner and group the appropriate SAS user
Create the followings files you need to modify according to what you want as shared libraries
create a .sas file e.g. start_share.sas
with in:
%let servername=sashrsrv;
options comamid=tcp;
libname geco '/data/mnt2/geco' ;
libname stil '/data/mnt1/stil' ;
libname fire '/data/mnt3/fire' ;
proc server id=&servername authenticate=optional;
run;
for 9.3 its exactly the same... It depends how your SAS software was installed.. all SAS env has a SASROOT somewhere...
On what OS are you running?
Start/stop script are for boot time usually so you have to think of who is to run the process since that user can/will have to stop restart modify the configuration etc... so it should not be root and for the system boot you will need to do an su to that user:
We stop/start every evening:
Stop - and we stop SAS metadata servers too in order to cleanup all temporary storage ( using SAS cleanwork utility...) then restart all the other reason is SAS share logs grow enormously if you have a lot of activity, its a easy means to reset... and keep daily logs...