BookmarkSubscribeRSS Feed
DaveShea
Lapis Lazuli | Level 10
Hi,

With SAS/Enterprise Guide 4.1 running SAS on a Windows server we experience numerous occasions where one user might be browsing a SAS dataset (in the default read-only mode) and another user needs to run some code to update that same dataset. By having the dataset open in browse mode, the first user is preventing the second user from being able to update the dataset.

The second user receives the following message:
ERROR: A lock is not available for BANANA.SHOES_DAVE.DATA, lock held by another process.

Whilst it is annoying that the read-only mode is not actually read-only, we would really like to be able to identify which user has a particular dataset open so that we can contact that user and ask them to close the dataset in question. We have several hundred users and, at present, are only able to send an eMail to all users to ask them to check to see if they have the dataset open.

Does anyone know a way that we can identify the user or the session ID that has the dataset open in browse mode. There does not seem to be a .lck file created for this situation as there is when user #1 is updating the dataset themsleves, perhaps with a Proc Sort.

I had thought that the LOCK statement would help identify the user with the dataset open but apparently not.

Any thoughts or clever ideas? Whilst it would be nice if the solution was within SAS, we could live with a DOS/Windows workaround.

Cheers,

Down Under Dave
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
I think that SAS is just using the windows file locking tools. Because SAS datasets are direct access, regular SAS reads have to lock the entire file.

If so, you can use this "Hnadle" tool to find the users who have the files open. ( http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx ). It runs with a Unix-like structure, so you could easily launch it from within SAS, parse the results, and send an e-mail just to the appropriate user. (I haven't tried it.)

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 2680 views
  • 0 likes
  • 2 in conversation