I have scheduled code that makes the same table each night, which is shared. Some people accidentally leave the table open - then it does not update.
Is there a way in the code to close the table in someone else's session?
Thanks!
No.
But you can use operating system commands to delete the file. At least in UNIX it is possible to remove a directory entry although the file is open.
@Jpep wrote:
That would work since I am replacing the table anyway. We have tried proc delete commands and it does not work since it is someone else's session.
What operating system commands should we attempt?
Thank you!
This depends on the operating system that SAS is installed on. If it is UNIX, I can provide a macro that physically deletes a dataset no matter what.
The issue of sharing/opening SAS datasets while trying to also update them has been the subject of innumerable discussions over the years...
The bottom line is there is no easy answer but here are a few ways to deal with this:
Thanks @LinusH. I've never used SAS/SHARE but I think depending on the update method being used this could work judging by what I see in this link (assuming of course that all users access the multi-user table via a SAS/SHARE server):
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.