01-15-2016 05:34 AM
Hi I am running a batch to the unix server which on execution forms a log file. When I try to re-run the same batch file, I get below error in the log file.
File is locked, but no other information is available. File =/opt/test/sas_programs/pgm/check.sas. System Error Code = 13.
Please help to get this problem resolved.
01-15-2016 06:03 AM
Batch, how exactly are you executing the program?
Are you 100% sure that the previous execution has finished?
What does your program do?
01-15-2016 06:07 AM
I owuld imagine something in your code is either a) not closing and open file ref ref, or b) isn't set to overwrite an existing file. However with no knowledge of the code being run, or the underlying system its hard to say. Check your code, things like libname excel, need to be closed otherwise the file handle is still open. If that is definately all closed, then check out the process with your IT team.
01-15-2016 07:28 AM
Have the system administrator check which process/user locks the file (with the UNIX fuser command).
You might even be able to do this yourself, if you can ssh to the server.