SAS Programming

DATA Step, Macro, Functions and more
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

 

 

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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