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
In-Reply-To: <6B637881-095B-42A5-A557-2CB12918C7E2@gmail.com>
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
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Allen Ziegenfus
Sent: Friday, January 07, 2011 12:33 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Sas File Locking
Hi everybody,
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.
libname test"/unix_path/blah_blah"filelocks=noneaccess=readonly;
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?
Yours truly,
Allen Ziegenfus