Help using Base SAS procedures

Error Reporting

Reply
N/A
Posts: 0

Error Reporting

Hi

I was wondering if there is a way of emailing if an error occurs in an overnight script?

Im using SAS 9.1.3 and on XP.

Thanks
Super User
Posts: 5,257

Re: Error Reporting

Support.sas.com is full of examples on this topic, if you care to search. Here's a couple that I found:

http://www2.sas.com/proceedings/sugi30/065-30.pdf
http://www2.sas.com/proceedings/sugi31/126-31.pdf
http://www2.sas.com/proceedings/sugi30/021-30.pdf

/Linus
Data never sleeps
N/A
Posts: 0

Re: Error Reporting

Hi

I have found the code i want but Outlook throws a wobbly when i send an email via SAS, is there anyway of 'signing' the email from SAS.

the code im using is:
%macro send_mail(job);
filename mymail email 'spud@work.com' subject=&job.;
%if &syscc>0 %then %do;
data _null_;
file mymail;
put 'An ERROR has occurred in the code';
run;
%end;
%else %do;
data _null_;
file mymail;
put 'The job ran to completion';
run;
%end;
%mend;
%send_mail(job=Monthly);

thanks

Spud
Super User
Posts: 5,257

Re: Error Reporting

Sorry, I don't really know what a wobbly is. Do you some kind of message from Outlook (or your e-mail server)? Does the SAS log looks ok? Your email config options in SAS might be to see, and some information about your email server.

About digital signatures, the only place I can see them mentioned in SAS doc is when using SSL, and I don't think this will apply when sending emails.

/Linus
Data never sleeps
SAS Super FREQ
Posts: 8,743

Re: Error Reporting

Hi:
Perhaps you mean either of these scenarios:
http://support.sas.com/kb/5/335.html
( about the message from Outlook: A program is trying to automatically send e-mail on your behalf. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No".)

or this one:
http://support.sas.com/kb/9/243.html (about Outlook prompting for a PROFILE name)

Otherwise, you might consider contacting Tech Support for help with emailing from a SAS program.

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 142 views
  • 0 likes
  • 3 in conversation