Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Email from m/f Batch
Does anyone know of how to send an email (to multiple recipients) from
within a mainframe program ? Does it have to be written to a file for
JCL to send or can it be done directly ? Either way, examples of code
welcomed !



--
posted via MFF :  http://www.MainFrameForum.com - USENET Gateway

Report this thread to moderator Post Follow-up to this message
Old Post
Old Mainframer
09-14-04 01:55 PM


Re: Email from m/f Batch
We used this jcl:

//GENMAIL EXEC PGM=IEBGENER //SYSUT1 DD *


TEST THIS IS LINE 1 TEST THIS IS LINE 2 TEST THIS IS LINE 3


//SYSUT2 DD DSN=HLQ.DISTNEW.MAIL,DISP=(,CATLG), // SPACE=(TRK,5)
//SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
//*-----------------------------------------------------------
//SENDMAIL EXEC PGM=IKJEFT01,DYNAMNBR=20 //SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=* //SYSEXEC DD DISP=SHR,DSN=SYS1.ISPCLIB //SYSTSIN
DD * SMTPNOTE SUBJECT(TESTMAIL) BATCH - TO(RECEIVER@MAIL.BLABLA.COM) -
DATASET('HLQ.DISTNEW.MAIL')
//*----------------------------------------------------------- //DELMAIL
EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE,DELETE),DSN=HLQ.DISTNEW.MAIL


You must have a SMTP server installed of course.



--
posted via MFF :  http://www.MainFrameForum.com - USENET Gateway

Report this thread to moderator Post Follow-up to this message
Old Post
Hans Kok
09-14-04 01:55 PM


Re: Email from m/f Batch
In article <1095151003.oRbv2jKJ10W16W4wC5AycA@onlynews>,
Old Mainframer <member@mainframeforum.com> wrote:

> Does anyone know of how to send an email (to multiple recipients) from
> within a mainframe program ? Does it have to be written to a file for
> JCL to send or can it be done directly ? Either way, examples of code
> welcomed !
>
>
>
> --
> posted via MFF :  http://www.MainFrameForum.com - USENET Gateway

Depends.  From a batch job, the simplest way is to write to the started
SMTP task.  If your SMTP task is named SMTPXYZ, they you would code in
your JCL:

//MAILMSG  DD  SYSOUT=(B,SMTPXYZ)

The sysout class must be the one configured for your SMTP task, and the
writer name must me the started task name.  Other than that, just format
it like any mail message.  E.g.

HELO SMTPXYZ
RCPT TO soandso@wherever.com
FROM you@yourplace.com
SUBJECT Test
Test

Report this thread to moderator Post Follow-up to this message
Old Post
Joe Zitzelberger
09-15-04 08:55 AM


Re: Email from m/f Batch
In article <1095151003.oRbv2jKJ10W16W4wC5AycA@onlynews>,
Old Mainframer <member@mainframeforum.com> wrote:

> Does anyone know of how to send an email (to multiple recipients) from
> within a mainframe program ? Does it have to be written to a file for
> JCL to send or can it be done directly ? Either way, examples of code
> welcomed !
>
>
>
> --
> posted via MFF :  http://www.MainFrameForum.com - USENET Gateway

Depends.  From a batch job, the simplest way is to write to the started
SMTP task.  If your SMTP task is named SMTPXYZ, they you would code in
your JCL:

//MAILMSG  DD  SYSOUT=(B,SMTPXYZ)

The sysout class must be the one configured for your SMTP task, and the
writer name must me the started task name.  Other than that, just format
it like any mail message.  E.g.

HELO SMTPXYZ
RCPT TO soandso@wherever.com
FROM you@yourplace.com
SUBJECT Test
Test

Report this thread to moderator Post Follow-up to this message
Old Post
Joe Zitzelberger
09-18-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:10 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.