Realtime Information (from Fraktal SAS Programming): Unterschied zwischen den Versionen

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
K
K
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 29: Zeile 29:
 
== Mail body ==
 
== 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.
+
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_;
 
  data _NULL_;
Zeile 46: Zeile 46:
 
|zurück=Workflow Documentation (from Fraktal SAS Programming)
 
|zurück=Workflow Documentation (from Fraktal SAS Programming)
 
|rechts=xx_right.png
 
|rechts=xx_right.png
|vorwärts=Straightforward Coding (from Fraktal SAS Programming)
+
|vorwärts=Apply Logic (from Fraktal SAS Programming)
 
|hoch=Duck_zazy_com.png
 
|hoch=Duck_zazy_com.png
|übersicht=Macro (from Fraktal SAS Programming)
+
|übersicht=Extending Control (from Fraktal SAS Programming)
 
}}
 
}}

Aktuelle Version vom 15. Mai 2014, 10:09 Uhr

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