Realtime Information (from Fraktal SAS Programming)

Aus phenixxenia.org
Version vom 30. Januar 2014, 10:02 Uhr von Wolf-Dieter Batz (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Kategorie:zazy {{SeitenNavigation1 |links=xx_left.png |zurück=Workflow Documentation (from Fraktal SAS Programming) |rechts=xx_right.png |vorwärts=Straig…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
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