BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Okay, the problem is that I have to send an e-mail with a subject line and a message in the body. But when I run my job it sends two e-mails and I only want one. Here's my JCL:
FILENAME OUTBOX EMAIL
TO=('person@msn.com')
SUBJECT='email test'
CT='TEXT/HTML';
*----------------------------;
DATA _NULL_;
FILE OUTBOX;
PUT '!EM_SUBJECT! email test';
PUT 'message in the body of email';
*----------------------------;
ODS HTML BODY=OUTBOX
STYLE=MINIMAL
RS=NONE;
ODS HTML CLOSE;
/*
I've tried it using the e-mail address on the filename statement, and using the PUT statement is the only way I know to put a message in the body of the e-mail. But when I do this it produces two e-mails. So what can I do to only send one e-mail that will have both a subject and a body?
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Refer to the SAS 9.2 DOC on this topic - link below. Also, there are several similar topic-related technical papers and SAS supplemental tips technotes on the SAS support website http://support.sas.com/ for your reference.

Also, be aware that are known SAS 9.1.3 SP1 problems where multiple EMAILs are generated, one that is blank and a second that has the desired output, but only when using ODS LISTING, as I recall.

Scott Barry
SBBWorks, Inc.

http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a002058232.htm

http://support.sas.com/documentation/cdl/en/hosto390/59577/HTML/default/chfnoptfmain.htm
deleted_user
Not applicable
Thanks.
I wasn't getting any blank e-mails, but you did give me the idea of removing the ODS part of my JCL and when I did that, It only sent one e-mail. So thanks again.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 644 views
  • 0 likes
  • 2 in conversation