Realtime Information (from Fraktal SAS Programming)

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen

Zurück

Übersicht

Vorwärts

Mail tags

Depending on how structured your programming approach is and moreover, how close you want to be to program activity, you might consider using e-mail as instant documentation vehicle.

SAS supports instant e-mail generation very well by using the MAPI interface definition that is automatically installed on every machine having access to a default mail gateway.

filename &MYMAILREF. EMAIL 'addressee@domain';

However easy-going this looks, you will get no result from the example above except an empty mail. Of course, you need to provide mail-tags according to RFC-822 <http://tools.ietf.org/html/rfc822>, like "To:", "Subject:", etc. and, if appropriate, the name and location of attachments.

filename &MYMAILREF. EMAIL 'addressee@domain'
subject = “Interim results from running program at &SYSTIME.”
attach = (“&MYPATH.\results.png” “&OTHERPATH.\tables.pdf”)
;

The 1st address given in quotes is used as "To:" tag. A 2nd (explicit) "To:" tag would overwrite the 1st one. In addition, tags may be populated with single values as well as with a blank separated list of quoted values set in brackets.


Mail body

As soon as the mail vehicle has been prepared as text storage location with special attributes ("TAGS") it is ready to receive body text.

data _NULL_;
file &MYMAILREF.;
put @1 “Dear Colleagues,”
 #3 @5 “please find attached …”
;
run;

Adhering to the code segment concept, we finally close the destination file by:

filename &MYMAILREF. clear;

Zurück

Übersicht

Vorwärts