Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emailing Data From a Dataset 1

Status
Not open for further replies.

AlboMrsP

MIS
Jul 16, 2010
8
GB
Hi, I've been asked if I can auto email data from a SAS data set. If it is possible, I'd need to send the data as text in the email rather than an attachment so it can be read on a Blackberry. Does anyone know how to do this? (or if it's even possible?) - I could really do with some help!!
Thanks Loads
Lyndsey
:)
 
Yes, it's in possible. It depends on how many observations you have, but if it's only 1 or you know which (you could use firstobs = n obs = n to get the one you want. Use symput:

data _null_;
CALL SYMPUT ('var1',var1);
run;

and then use the macro variable (&var1) in your e-mail statement.

Do you know how to send an e-mail from SAS? There's code for that too if you need it.
 
Oops, sorry-

Should be:

data _null_;
set data1 (firstobs=2 obs=2);
CALL SYMPUT ('var1',var1);
run;
 
Thank you loads, I'll give it a go.

Think we have some code for sending an email done by a previous coder so I'll use that.

Thanks again
Lyndsey
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top