BookmarkSubscribeRSS Feed
Quartz | Level 8


We are running Enterprise Guide 5.1 on a Windows based server.

I have some users that like to the the Filter and Sort task.  I absolutely hate this as it puts locks on datasets (whilst typing this, it occurred to me that I could disable access to the Filter and Sort task, but I don't really want to do that), so when my daily jobs run, if there is a lock on one of the early datasets, everything fails, and I have to run everything during the workday.

Is there a way to delete the datasets that typically start with FILTER_FOR_ (whatever the table was called) at the end of each day?

Is it possible in SAS?

I wouldn't want it just doing the deletion for my account, but every user that has a session open overnight.

Two approaches pop into my mind:

* Run a script that crawls through all the work directories and looks for any file that starts with FILTER_FOR and deletes them (my dos/shell scripting is very basic at best)

* Schedule a query each night in SAS that deletes these files, PROC DELETE/DATASET for example (I wouldn't know how to have this run against all WORK directories though)

Does anyone have any other suggestions, or has something like this implemented?


Quartz | Level 8

I thought about using the dictionary views/tables in the SASHELP library.  I wasn't able to find WORK sessions for other users, just my current session.

I tried a script, and I think it works.  I have it scheduled to run at 9pm every night.  This is what I ended up with:

*delete filter_for_ datasets that can cause locks on data;
x 'w:';
x 'cd W:\SASWORK\temp';
x 'del /s filter_for_*.sas7bdat';

Pretty simple solution in the end I think, not particularly elegant, but it gets the job done.

I'm still interested if there is a better solution to this though?


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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 1 in conversation