BookmarkSubscribeRSS Feed
Saugata
Obsidian | Level 7

Hi all,

I am facing an weird problem. I am creating a table from one process (sas session) and trying to delete that same table using a second process (sas session). These sas sessions are getting called using Java from interface.

Now in the second process when I am trying to delete the dataset it is telling that ERROR: Delete lock is not available for TMPLIB.SPOT_STATUS.DATA, lock held by another process.

But we are not locking this table in anywhere. The code used for deletion is:

   

     proc datasets library=tmplib;

     delete spot_status;

    quit;

Could you please suggest a solution. Is it possible that some external process is locking the table and if yes then is there a way to track that process?

Thanks in advance for your help.

Thanks & Regards,

Saugata Mukherjee.

2 REPLIES 2
Peter_C
Rhodochrosite | Level 12

how  do you ensure the creation is complete (and table closed) before second session attempts the delete?

FriedEgg
SAS Employee

What library engine is being used?

There are a number of ways in which to avoid this error and have a program wait for a lock to become available.

Here is one example paper that outlines a macro call %trylock

Play Nice with Others: Waiting for a Lock on SAS Table

http://www.lexjansen.com/pharmasug/2005/posters/po33.pdf

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
  • 2 replies
  • 2070 views
  • 0 likes
  • 3 in conversation