How to allow more than one person to upload data in a sas data set at the same time

Reply
Occasional Contributor
Posts: 10

How to allow more than one person to upload data in a sas data set at the same time

To All:

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?

Thanks,

Reggie

Regular Contributor
Posts: 219

Re: How to allow more than one person to upload data in a sas data set at the same time

Posted in reply to Reggie_SAS

You need to use SAS/SHARE for concurrent user updates. It was developed to handle such requirements.

Super User
Posts: 3,260

Re: How to allow more than one person to upload data in a sas data set at the same time

Posted in reply to AhmedAl_Attar

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)? 

Regular Contributor
Posts: 219

Re: How to allow more than one person to upload data in a sas data set at the same time

Posted in reply to Reggie_SAS

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,

Ahmed

Valued Guide
Posts: 2,177

Re: How to allow more than one person to upload data in a sas data set at the same time

Posted in reply to AhmedAl_Attar

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   ;-)

Ask a Question
Discussion stats
  • 4 replies
  • 251 views
  • 0 likes
  • 4 in conversation