BookmarkSubscribeRSS Feed
Krohn
Obsidian | Level 7

ERROR: Lock held by process 346

 

I'd like to know directly who is using the Dataset and not the JOB_ID

Is it possible to retrieve like: "Lock held by user 1234" (that &SYSUSERID macro variable)??

 

  • SAS Enterprise Guide 6.1
  • X command unabled

Thanks!

2 REPLIES 2
LinusH
Tourmaline | Level 20
With the pid you can look up the user by using OS tools/commands.
What is the underlying requirement?
There have been numerous threads discussing this is, sugest that you browse these.
Bottom line: if you have frequent problems with locking switch to a multi user data store, or implement a script that kills all SAS processes prior to batch processing.
Data never sleeps
Kurt_Bremser
Super User

You will need to use OS tools enabled to do this.

To do it manually, log on to the server with ssh and use something like ps -ef|grep processnumber

To do it automatically in SAS, you MUST have XCMD enabled.

 

My preferred method to avoid this is to physically delete the target dataset file using OS commands (works on UNIX like a charm) before writing it.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1553 views
  • 2 likes
  • 3 in conversation