sending email from jcl



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: sending email from jcl

Postby nallasivam » Wed Jun 09, 2010 6:46 pm

need a correct jcl to send email via jcl....
pls help me...
nallasivam
 
Posts: 8
Joined: Wed Jun 09, 2010 6:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: sending email from jcl

Postby Robert Sample » Wed Jun 09, 2010 7:49 pm

//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD   SYSOUT=*
//SYSUT2   DD   SYSOUT=(9,SMTP)
//SYSIN    DD   DUMMY
//SYSUT1   DD   *
HELO <mainframe name>
MAIL FROM: <xxxxxxxx@xxx.xxx>
RCPT TO: <xxxxxxxx@xxx.xxx>
DATA
FROM: <whoever>
TO: <whoever>
Subject: <subject line>
data lines
.
/*
Comments:
1. The sysout class is specific to site -- we use 9; a lot of sites use B, but only your site support group can tell you for sure.
2. The sysout started task name is specific to site -- we use SMTP but only your site support group can tell you for sure
3. HELO, MAIL FROM, RCPT TO, and DATA lines are required. Multiple recipients require multiple RCPT TO lines, one per recipient
4. Line numbers are not part of SMTP and will cause problems.
5. The data lines must be followed by a single line with a period on it and nothing else. If the period is missing, the email is not valid and will not be sent.
6. This is instream -- the data could come from a file. The record limit is 998 characters (1000 minus the carriage return and line feed added for PC systems)
7. The <> around the MAIL FROM and RCPT TO addresses are not optional -- they are part of the standard
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: sending email from jcl

Postby MrSpock » Wed Jun 09, 2010 9:09 pm

Robert, I don't know if it would help you to reduce the amount of typing you need to do everytime this question is asked, but maybe you could just point them to the MVSMAIL page link:

MVSMAIL.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post