12-19-2012 10:59 AM
I am trying to determine how to take the lock off the SAS data set when another person is using it. Actually I would like to know how to allow more than one person to be able to upload data to a SAS dataset at the same time?
For example when person A is working within the dataset, if person B tries to open and work within it, the data set is locked and person B cannot input his data. Is there a way to get rid of the lock?
12-19-2012 02:49 PM
If SAS/SHARE is not available to you there are ways of checking locks, and then delaying updates until the other process has finished using it. This type of solution is only workable for low numbers of users and for data updates that don't last very long. If you want to explore this option, check out the dataset OPEN function, and consider how you could put this in a loop to keep trying it until it is successful.
Personally I think SAS should incorporate the SHARE capability in the BASE SAS product - I'm sure most users have struck issues like unable to open your SASUSER.PROFILE warning just because you run more than one SAS session at the same time and SASUSER cannot be shared! How about it SAS (end of rant)?
12-20-2012 10:33 AM
A manual approach is possible but it will have its flaws and you'll have to develop a really robust application Interface to Minimize/Eliminate pitfalls.
Check the LOCK Statement in the SAS Online Help Docs, it's available part of BASE SAS & SAS/SHARE. Having said that,
even if you built some sort of Graphical User Interface, to manage your Data Set(s), there is no way you can stop users from access the Data Set(s) directly from within SAS Explorer Window, or even from the Data Step/SQL statements!!!
Hence your best bet, is to have your volatile Data Set(s) that could be modified by multiple users managed by SAS/SHARE Server/Library definition, and this way, you'll be covered all around regardless where the data get access from.
just my 2 cents,
12-22-2012 12:27 PM
another option, that I consider more robust and simpler that writing your own equivalent to SAS/SHARE - use an external database which is designed to support concurrent transaction updates by more than one user.
Of course, you'll need a SAS/Access module to read the data ...... might be simplest just to invest in SAS/SHARE ;-)