Date: Fri, 7 Jan 2011 12:48:26 -0500
Reply-To: Suzanne McCoy <Suzanne.McCoy@CATALINAMARKETING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Suzanne McCoy <Suzanne.McCoy@CATALINAMARKETING.COM>
Subject: Re: Sas File Locking
Content-Type: text/plain; charset="us-ascii"
There was an option for this in EG 4.1 that prevents the read lock from being taken. You have to get it done in every EG session but once you change it in that EG client it retains the setting for every EG project that EG client accesses. I'll see if I can find it in EG 4.2
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Allen Ziegenfus
Sent: Friday, January 07, 2011 12:33 PM
Subject: Sas File Locking
Ever since I started working with SAS I have never quite understood why SAS tries to lock every little data set that it can get its hands on. <rant> I've spent way too much of my SAS-consulting life closing VIEWTABLE Windows in PC-SAS, or killing EG-Processes that have data sets locked because EG locks every table you click on. </rant>
First of all, what is the idea behind this? As far as I can tell, SAS creates read-locks to enforce a kind of "Read-Repeatability" - that you can be certain the data you are looking at are current. I could imagine the locking isalso used to handle the various editing tasks that are available in the VIEWTABLE interface/Enterprise Guide to edit data directly.
In my case, it is irrelevant to me if the data I am looking at is 100% current - it is much more important that our batch processes can run smoothly without aborting because someone left EG open.
Does anyone have any suggestions about how to deal with this problem? We are dealing with regular SAS data sets (.sas7bdat files) on Solaris. The ideas that we have come up with are:
1. Process killer job, which kills all EG-processes before the batch jobs start - would work but seems a bit crude
2. Use the SHARE Server for all libraries - but I had heard that the SHARE Server does not help when a batchjob rewrites a complete data set
3. Copying all the data into a separate environment and only allowing EG access there - would work but is very cumbersome
4. Today I found the Unix-LIBNAME Optionfilelocks=none. Apparently with this option SAS does not create any locks at all. My idea was to combine this option withaccess=readonly for EG-clients to prevent any conflicts. This seems to work, but I don't know if it has any other negative effects.
I would expect there to be an option that would just prevent these read-locks, but still create the normal write locks. But I have not found this option.
Anyone having any experience usingfilelocks=none or have any other ideas?