BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jhh197
Pyrite | Level 9
Hi All,
I get below error when I try update dataset in spde server

Error : The file is locked by another user
Error : Requested lock is not available for data set
Libname stest spde ‘path’;
Libname mlib ‘path’;
proc append base = stest.cards (asyncindex= yes partsize=100) data= mlib.cards force;
run;

Can anyone please help .
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

If this is a constant problem (the lock error always occurs) then follow @SuryaKiran 's instructions.

 

If this is an intermittent problem, then use of the FILELOCKWAIT option might help: https://documentation.sas.com/?docsetId=hostwin&docsetTarget=n0fh4oaq31gvqkn1hlh75lvv9396.htm&docset...

View solution in original post

7 REPLIES 7
SuryaKiran
Meteorite | Level 14

Hello,

 

Did you check if any other members are accessing the dataset (Other users might be writing to it) or Did any other user opened in window and doing nothing. Make sure they close the dataset before you can make updates. 

Thanks,
Suryakiran
jhh197
Pyrite | Level 9

how do I check if any user opening the dataset ?

r_behata
Barite | Level 11

This SAS Note May be of Interest for the SPDE datasets locking issue.

 

http://support.sas.com/kb/18/467.html

 

 

SASKiwi
PROC Star

If this is a constant problem (the lock error always occurs) then follow @SuryaKiran 's instructions.

 

If this is an intermittent problem, then use of the FILELOCKWAIT option might help: https://documentation.sas.com/?docsetId=hostwin&docsetTarget=n0fh4oaq31gvqkn1hlh75lvv9396.htm&docset...

jhh197
Pyrite | Level 9

Not Sure how much is the wait time . Is there any other option

SASKiwi
PROC Star

Option to do what? First you need to understand what / who is locking the dataset in the first place and for how long. Then you can implement a solution that might use FILELOCKWAIT or some other technique to reduce the possibility of locking. There is no SAS option that will fix a lock that has already happened in another process. 

r_behata
Barite | Level 11

There is a Macro available that waits till the lock is available until a configurable duration. Once the dataset is released by the other process it puts a lock so that no other process can access while it is being used by your process and releases the lock after execution. But the only drawback is that this wont work of the same dataset is opened by an person( and not process) from a client tool like EG.

 

http://support.sas.com/kb/51/275.html

 

 

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 6098 views
  • 6 likes
  • 4 in conversation