BookmarkSubscribeRSS Feed
Reaensh
Calcite | Level 5

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

7 REPLIES 7
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Reaensh
Calcite | Level 5

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

LinusH
Tourmaline | Level 20

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.

Data never sleeps
Reaensh
Calcite | Level 5

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?

Kurt_Bremser
Super User

@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.

Kurt_Bremser
Super User

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.

MMMIIIIKKKKEEEE
Obsidian | Level 7

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!

Best of luck in all your SAS endeavors!

----MMMMIIIIKKKKEEEE
(aka Michael A. Raithel)
Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 3345 views
  • 1 like
  • 5 in conversation