BookmarkSubscribeRSS Feed
shivrajpawar98
Fluorite | Level 6

Hi All,

 

I want to send alert email through sas viya. whenever the saswork libarary is full then automatically it should send an alert mail

 

Regards,

Shivraj

4 REPLIES 4
SASJedi
SAS Super FREQ

Check out the SAS Communities library article Tip: How to send email using SAS

 

Check out my Jedi SAS Tricks for SAS Users
Kurt_Bremser
Super User

Your SAS might not be able to do anything once WORK is exhausted, so this may not work at all.

Instead use your operating system's tools. Servers have tools to detect such conditions and issue alerts in multiple ways.

Sajid01
Meteorite | Level 14

There are tools at the OS level such as SolarWinds that periodically monitor the work library. Typically, this occurs at 15 minutes interval.

When the free space reduces to a predetermined level (for example 10%), the software sends an alert.
This type of action can be implemented writing a custom script or a SAS program that runs at 15 minutes interval.

Kurt_Bremser
Super User

In UNIX, I'd run the df command, pipe the output into cut to extract the "percentage used" column, after which mail (or mailx) can be used conditionally. All this in a short shell script which can easily be started every minute through cron (such a script only needs milliseconds to run, with minimal CPU use when no mail needs to be sent).

And it is always a VERY GOOD IDEA to run the SAS cleanwork utility periodically to get rid of the remnants of crashed SAS sessions.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 1224 views
  • 5 likes
  • 4 in conversation