Help using Base SAS procedures

Identify who has a dataset open

Reply
Occasional Contributor
Posts: 8

Identify who has a dataset open

Dear all,

I work in a network, with both Base SAS 9.2, Data Integration Studio 3.4 (DIS).
I have a problem when my macro is trying to access and edit a dataset that either someone else has open, or someone else's macro is processing.
My question is, there is way to know which user has locked the dataset? The log of SAS only says the dataset is in use by someone else, but I'd like to see "by who" as part of the log.

Regards
Karl
N/A
Posts: 0

Re: Identify who has a dataset open

Hi Karl,

I have had few time to deal with this myself. I did not arrive at a solution but found a work around to lock the datasets and directories for my use before starting the process/running my codes.

Refer this document, I loved it.
http://www.lexjansen.com/pharmasug/2005/posters/po33.pdf

Hope it helps

Regards
Surya
Occasional Contributor
Posts: 8

Re: Identify who has a dataset open

Posted in reply to deleted_user
Thanks man! it's a good work around
PROC Star
Posts: 1,760

Re: Identify who has a dataset open

You might also want to consider using sas/share.
Super User
Posts: 7,782

Re: Identify who has a dataset open

If your SAS is installed on a UNIX, the error message will include the process number of the locking process. ps -fp processnumber will give you the user's ID.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 6

Re: Identify who has a dataset open

Posted in reply to KurtBremser

Hi,

   on linux I use following syntax:

    ps -ef | grep 1234   

     ... where 1234 is the process ID that is locking your process

kind regards,

Mark

Ask a Question
Discussion stats
  • 5 replies
  • 1929 views
  • 0 likes
  • 5 in conversation