BookmarkSubscribeRSS Feed
Sarvendra
Fluorite | Level 6

Hi

I have a task of creating Alerts upon certain condition.

Task-Provide an alert for any card with $10000 or more in cash loads in 30 days.

Can anyone please tell how to create Alerts in SAS

Waiting for your replies!!!

Thanks

Sarvendra

7 REPLIES 7
DBailey
Lapis Lazuli | Level 10

The process we use requires you to:

  1. code a query that identifies the conditions for which you want to send an alert
  2. wrap the code in a macro that generates an email if there are records found
  3. use SAS Managment Console to schedule the job at whatever interval you need
RobertWoodruff
SAS Employee

That'll do it nicely!

Sarvendra
Fluorite | Level 6

Thanks a lot Bailey for the reply.but can you please elaborate step 2 and 3.how email can be genrated inside a maco and

how job can be scheduled using SAS console..can u give any detailed document link as i dont have much exp in SAS management console

Thanks

DBailey
Lapis Lazuli | Level 10

unfortunately, the scheduling is site specific.

As for the email in a macro...

%macro tst();

all of your code...

proc sql noprint;

select count(*)

into :recs

from work.final_output;

quit;

%if &recs ne 0 %then %do;

     filename mailit email;

     data _null_;

    file mailit

     to=('emailaddress')

     from=('from email address')

     sender='Sender'

     Subject="subject"

     ;

    Line1= 'email text line 1';

    Line2= 'email text line 2';

    Line3 = "Syscc = &syscc";

    put Line1;

    put Line2;

    put Line3;

    put ;

    put ;

    put "This email address is not monitored for replies.";

    put ;

    run;

%end;

Sarvendra
Fluorite | Level 6

Much Thanks  Bailey Smiley Happy

But I did not get the line "unfortunately, the scheduling is site specific."..what does it mean?

DBailey
Lapis Lazuli | Level 10

it means that you should talk to your site administrator or SAS support for more details.

SASKiwi
PROC Star

To provide a little bit more detail on scheduling...you can only schedule from SAS Management Console if the SAS LSF scheduler is installed as part of your SAS Server installation.

You need to find out what scheduling facilities you have available to you before we can offer further advice - as per DBailey.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 7 replies
  • 1673 views
  • 0 likes
  • 4 in conversation