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.
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.
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.
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.
To avoid the lock, you need to:
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.