The SAS Output Delivery System and reporting techniques

Mainframe email problem that I can't seem to fix, help appreciated.

Reply
N/A
Posts: 0

Mainframe email problem that I can't seem to fix, help appreciated.

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?
Super Contributor
Super Contributor
Posts: 3,174

Re: Mainframe email problem that I can't seem to fix, help appreciated.

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
N/A
Posts: 0

Re: Mainframe email problem that I can't seem to fix, help appreciated.

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.
Ask a Question
Discussion stats
  • 2 replies
  • 138 views
  • 0 likes
  • 2 in conversation