BookmarkSubscribeRSS Feed
jbelknap
Calcite | Level 5
I have a library created on my network directory, and in it is a SAS dataset called Data3. My directory folder now contains Data3 and Data3.sas7bdat.lck. I cannot delete either file. When I try to re-run the SAS code that creates Data3, I cannot re-write the dataset in the library. SAS errors out that I do not have the proper authorization level to overwrite the changes. My company does not have authorization levels in our SAS environment. What can I do to fix either remove the files or overwrite them? Thanks!
2 REPLIES 2
Patrick
Opal | Level 21
The suffix lck of Data3.sas7bdat.lck exists while a data set gets created by SAS. (..this part deleted based on correct input from Daniel Santos...).

As Data3.sas7bdat.lck exisist and you can't delete it I can think of 3 possibilities:

A
You or someone else has a second SAS session open which is re-creating this SAS file "right now". Close this session or wait until it ends.

B
You have somewhere a hanging SAS process on the server which locks the datasets (i.e. killed SAS EG session on local PC with now orphaned SAS server session hanging on this datastep).

C
The SAS process which created the two files runs under a different user than the one you're using now trying to delete the files. Check who owns the files.

For cases B and C:
There must be someone within your organisation\SAS environment with the role of SAS administrator. Have this person look into the issue. You yourself most likely lack the necessary permissions to resolve the issue.
In case you're using server "local": Use task manager and look for a sas process (sas.exe) and kill this process or: restart your PC.

HTH
Patrick

Message was edited by: Patrick Amendments as I agree with what Daniel wrote.


Message was edited by: Patrick
DanielSantos
Barite | Level 11
Hello Patrick.

From what I've seen, the .lck file is pretty much independent of the library. I mean the lock file is always created on the same library that holds/will hold the final datastep. Hence at end of the process the older table gets deleted and the lck file renamed, there is no additional I/O involved such has file copying from here to there.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 14972 views
  • 2 likes
  • 3 in conversation