BookmarkSubscribeRSS Feed
Rajeshganta
Calcite | Level 5
I have a data with their performances with different students i want to send mail to each one individually to thier email ids and to their parents
10 REPLIES 10
Quentin
Super User
This is definitely possible with SAS. Please post the code you have tried (along with sample data) and describe what is going wrong. If you're not sure where to start, I would try searching user group papers over at lexjansen.com; there will be plenty of papers that present ways to send email from SAS.
BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Rajeshganta
Calcite | Level 5
Data is as posted above i want to semd the data individually to student 1 and 2
Quentin
Super User

Sorry, I don't see data or code in your message.  I only see one sentence.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Rajeshganta
Calcite | Level 5
Data is like
Stntid name marks email fatheremail
123 abc 78 123.gmail fath1.gmail
234 bcd 98 234.yahoo fath2.yahoo
Rajeshganta
Calcite | Level 5

Please find the attachment of the requirement to give a better solution

Quentin
Super User

Please post the code you have tried and describe what is going wrong.   FYI, many people won't read attachments, due to their ability to spread malware. 

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Rajeshganta
Calcite | Level 5
I have assigned a sno and linked a do loop with number, email script is next to that, snapshot format but it is not working
Quentin
Super User

Sorry, if you're unable to share your code, it's too hard to help figure out what is going wrong.  

 

For tips on how to write a clear question that makes it easier for others to help you, please see these  articles:

https://communities.sas.com/t5/SAS-Support-Communities/How-to-ask-a-good-question-and-receive-a-fast...

https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133

 

 

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Rajeshganta
Calcite | Level 5

Firstly i have data as 

sno name marks email fatheremail

1 abc 95 xxx.gmail fxxx.gmail

2 bcd 65 yyy.gmail fyyy.gmail

3 cda 57 zzz.gmail fzzz.gmail

1st step:

data snap;

set Work.data;

do i=1 to 3 by 1

/*mailer code starts*/

file name message email to =('email')

cc=(fatheremail)

subject= marks

CT="Text/HTML";

ods listing close;

ods html body = message rs= none style=normal;

/*body of email*/

proc sql;

title j=left height 11pt clolour black font=""

Quit;

Proc Tabulate

Data=work.snap;

var

class

marks* sum*F = BESTX12.

run;

footnote;

end;

run;

 

 

This is the program i am using but getting an error as do loop is not completed

Quentin
Super User

Hi,

 

There are several problems with your code.  Instead of writing the whole thing at once, I would develop it in steps, e.g.:

  1. Code to send one email with "hello".
  2. Code to generate the HTML report you want (PROC TABULATE, or whatever).
  3. Code to send one email with a custom HTML report in the body.
  4. Code to read a dataset and send multiple emails

I would suggest looking at user group papers for examples, this one looked handy:

https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/038-2008.pdf

 

 

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 889 views
  • 0 likes
  • 2 in conversation