SAS Procedures

Help using Base SAS procedures
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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