BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dcmacedo
Obsidian | Level 7

I created a oracle library to use as "work" in sas guide, where the users can create "work" tables directly in oracle. In our cenary the dimensions and facts are in oracle enviroment and this approach otimises the querys. I searching for a way to delete this "oracle work tables" after the end of the sas session.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Paul, there isn't a hook for individual users to set. But an admin can set a Termination Program in the Workspace definition. See this topic in the admin guide.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

6 REPLIES 6
paulkaefer
Lapis Lazuli | Level 10

You can easily clear all datasets from a library (source😞

 

 

proc datasets library=lib kill;
run;
quit;

 

I'm not sure if there's an equivalent to the autoexec but at the end, rather than beginning, of a SAS session. This could be a good opportunity to educate the users on the difference between work and permanent libraries, but I agree that it would be nice to have this functionality.

 

I submitted a comment to @ChrisHemedinger on his related blog article. If there's not a way to have an autoexec on session close, I'd say we should submit it as a SASware Ballot Idea.

 

ChrisHemedinger
Community Manager

Paul, there isn't a hook for individual users to set. But an admin can set a Termination Program in the Workspace definition. See this topic in the admin guide.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
dcmacedo
Obsidian | Level 7

Thanks for the reference @ChrisHemedinger, it's exactly this feature I was looking for, I'm new to SAS administration, so I was unaware of this configuration.

dcmacedo
Obsidian | Level 7

Thanks for the answer. @paulkaefer, this is exactly the code I'm going to use. In the future I intend to switch to an Oracle stored process.

ChrisHemedinger
Community Manager

My answer assumes that you're running this in a SAS workspace via EG or SAS Studio.  If running with interactive SAS on Windows, there is the TERMSTMT option.  This does not work on Workspace/Stored Process servers.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
dcmacedo
Obsidian | Level 7

We have SAS Enterprise BI, but we only use SAS Data Integration (sas batch server), SAS Enterprise Guide and SAS Web Report Studio. Our BI is in low demand, our users are mainly using SAS Guide to perform analyzes directly in our Oracle database (90% of our data is in Oracle).
Our users love SAS Guide.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1645 views
  • 10 likes
  • 3 in conversation