Page 1 of 1

jcl to send email from mainframe

PostPosted: Wed Oct 06, 2010 2:35 pm
by eswarreddy
how to send an email from jcl in mainframe system

Re: jcl

PostPosted: Wed Oct 06, 2010 3:05 pm
by Robert Sample
If your site has SMTP set up, you use SMTP to send the email. This is a question where you MUST talk to the site support group -- SMTP requires a writer class parameter and started task name parameter, both of which vary from site to site and what works at my site probably won't work for your site. And if they don't have SMTP installed, they probably have another product installed to handle emails and they would, again, be the ones to know the details.

Re: jcl to send email from mainframe

PostPosted: Thu Oct 28, 2010 12:50 pm
by SGZ
hey folks,
if smtp is running on your system, you can things like this:

//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
helo smtp
mail from:<x.y§abc.com>
rcpt to:<a.by§abc.com>
data
date: 30 jan 04 14:48:47 +0200
from:<x.y§abc.com>
to:<a.b§abc.com>
subject: a mail

text text

/*
//SYSUT2 DD SYSOUT=(Z,SMTPSERV), <- depends on your smt defintions
// DCB=(LRECL=80,BLKSIZE=80,RECFM=F,DSORG=PS)
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A

anything is working in z/os, file attachement, mime and so on.
regards