Hi,
I keep getting SAS I/O Errors or a Filelock issue on a datastep I am trying to run at times on a Unix environment.
I have seen the FILELOCKWAIT is set to 0, so how do I change this to 20 seconds in the config file, as I have tried and it does not work.
Also does anyone know how to get rid os I/O errors and locking of files as it happens intermittently, or can I access a specific log to check what the issues are?
Thanks
Reanesh
AS for your question on file locks, this is discussed in many posts on here. There are ways to force it, its an os lock not sas, but its not recommended. Its more of a process issue, why is it that you and someone else are trying to access the same file? Is there a better way of doing it, the answer to that is yes. There are various methods - have user areas where files are checked out to and you work on those rather than all on the same files. Or use a database - that allows concurrent access. Or choose some warehouse software that can control accesses, assign queues etc. Many options.
Hi,
Thanks for the reply.
No one else is accessing this file and I am the user running a few data steps and proc means and this issue appears.
I deleted the lock file yet it still appears when I try to re-process the sas program.
Can you please advise on a better method please.
Thanks
This could be due to some fault logic in your program, or some constraint/issue at the OS level. Work closely with your system administrator and try to capture the lock event at the OS level.
Hi,
I got this error:
ERROR: An I/O error has occurred on file RPW.SWITCHER.DATA.
ERROR: File RPW.SWITCHER.DATA is damaged. I/O processing did not complete.
When I look in the folder there is a file of this type now:
.nfs002d00000006822000001da2
Would this suggest a hardware issue as opposed to program?
@Reaensh wrote:
Hi,
I got this error:
ERROR: An I/O error has occurred on file RPW.SWITCHER.DATA.
ERROR: File RPW.SWITCHER.DATA is damaged. I/O processing did not complete.
When I look in the folder there is a file of this type now:
.nfs002d00000006822000001da2
Would this suggest a hardware issue as opposed to program?
That "nfs" lets me suspect that you are working on an NFS mount here. You might have run into a short network outage that caused the error.
My solution: stop working via network mounts and use locally mounted disks.
A lock problem usually causes this message to be written to the log:
ERROR: A lock is not available for LIBARY.DATASET.DATA. ERROR: Lock held by process nnnnnnn.
So you need to look in the UNIX ps list for the offending process and determine why it had the dataset open.
Reaensh,
Bummer!
Though you have received some good advice and suggestions, I don't think anybody directly answered your question about setting the FILELOCKWAIT option. Here is an example:
libname timing "r:\path" filelockwait=10;
HTH!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.