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...
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.
how do I check if any user opening the dataset ?
This SAS Note May be of Interest for the SPDE datasets locking issue.
http://support.sas.com/kb/18/467.html
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...
Not Sure how much is the wait time . Is there any other option
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.
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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.