BookmarkSubscribeRSS Feed
Leo9
Quartz | Level 8

Hi All,

I am sure this topic has been discussed multiple times in this forum but I couldn't find good solution after going through different posts. I work in a shared environment where many different programmers work at same time. We have many users trying to look at data and when a programmer is trying to update the dataset they get the dreaded  dataset is locked error. We work in windows SAS environment. 

 

Is there any solution ? Ideally we would like to update the SAS dataset even if it is opened by another user. 

 

 

6 REPLIES 6
Kurt_Bremser
Super User

Since you run your SAS on a glorified XBOX instead of a real operating system, this will not be possible.

You might manage to do it if you create a view for the dataset and have the users use the view only, but I am not sure about that.

Or you instill discipline on your users to not keep datasets open.

 

PS on a real operating system (read: UNIX), one can remove a directory entry for a file that is in use. My paper for this year's Global Forum dealt with that.

Cynthia_sas
SAS Super FREQ
Hi:
When a dataset is locked by another user, you would not be able to update the file. There are products like SAS/SHARE that allow concurrent access to data and concurrent updates. You'd need to check with your SAS Administrator whether that was an option. Other products have ways for concurrent access/updates through the use of metadata permissions, but again, you'd need to check with your SAS Administrator whether your data was secured by the appropriate permissions to do what you want to do.
Cynthia
Leo9
Quartz | Level 8

Thank you. Could you please provide more information regarding metadata solution ? I work for very small company with IT having very little clue about SAS and its administration. 

Cynthia_sas
SAS Super FREQ
Hi:
Your best resource for help is to open a track with Tech Support. There's no simple or quick answer to this question. How to establish the ability for concurrent access and updates will depend on your system components and the security settings.
Cynthia
SASKiwi
PROC Star

I suggest you check out the FILELOCKWAIT option on the LIBNAME statement. If you carefully manage your SAS processes updating the dataset being locked so that it is only locked for a few seconds then this option can be very useful. However if users have a habit of viewing this dataset in a SAS Table Viewer then that could lock the dataset for hours - until they close the viewer window. To avoid this type of behaviour, having a process that creates a temporary copy of the dataset for viewing purposes is useful.  

AllanBowe
Barite | Level 11

To avoid the lock, you need to:

 

  • Use clients for viewing that don't lock the dataset (such as SAS Studio, Data Controller, or build your own web interface)
  • Set read only permissions to prevent the lock (in this case you may need to run updates using a batch account, or as a Stored Process / Job Execution service
  • Switch to a library engine that supports concurrent read/writes, ie, a database.
/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 1157 views
  • 4 likes
  • 5 in conversation