SMTP JCL

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

SMTP JCL

Postby jaggz » Thu Nov 04, 2010 2:00 pm

Hi,

I prepared a jcl program for sending an email from mainframe to my personal email account. Below was the jcl and after submission i got a return code of 00.
Even after the successful return code i am unable to receive email from mainframe. could you please explain me the reason for not receiving the email from mainframe.


//A255209J JOB MSGCLASS=X,MSGLEVEL=(1,1),CLASS=T,
// REGION=5M,NOTIFY=&SYSUID
//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
helo yourmvs
mail from: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
Cc: <rick@gmail.com> Subject: Hola
Jags: guten tag. was ist ihre namn.
stardator ist kuss. Always
hej hej.
.
quit
/*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm

Re: SMTP JCL

Postby NicC » Thu Nov 04, 2010 2:35 pm

No such thing as a 'jcl program' even though the L in jcl does stand for Language the J and C stand for Job and Control. JCL provides a means of telling the OS what program you want to run and what resources it needs.

I know very little about FTP from mainframe but there are several posts about doing this. Have you searched for them?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2145
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm

Re: SMTP JCL

Postby jaggz » Thu Nov 04, 2010 3:01 pm

Sorry for wrong representation of JCl as program. I searched it and found that the SMTP server has to be configured accordingly for recieving the email from mainframes. Here in our shop it is prohibited due to policy.
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm

Re: SMTP JCL

Postby NicC » Thu Nov 04, 2010 3:43 pm

So you could have saved some time by searching first, as the rules state that you should. Oh well, it is your time wasted.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2145
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm

Re: SMTP JCL

Postby Robert Sample » Thu Nov 04, 2010 5:03 pm

Even if not a policy issue, your SMTP commands are not coded as per RFC 2821 and RFC 2822 (hint: Google is your friend). For example, without a DATA command there will be no email sent, period.
Robert Sample
Global moderator
 
Posts: 2751
Joined: Sat Dec 19, 2009 8:32 pm
Location: Atlanta, GA

Re: SMTP JCL

Postby mainframe_Puli » Fri Nov 05, 2010 1:04 am

HI Jaggz,

I am new to Mainframe field, but few days before I was working with one of my senior regarding SMTP.
As per my knoweldge your JCL doesnt doesnt have the key word DATA.

//A255209J JOB MSGCLASS=X,MSGLEVEL=(1,1),CLASS=T,
// REGION=5M,NOTIFY=&SYSUID
//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
helo yourmvs
mail from: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
Cc: <rick@gmail.com>
Subject: Hola
Content-type: text plain;
data
Jags: guten tag. was ist ihre namn.
stardator ist kuss. Always
hej hej.
.
quit
/*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//....

I'm not pretty much sure whether this will produce desired result, please just take a look at this and also you have to do some SMTP configurations....

Friend suggest me if there's any mistake
mainframe_Puli
 
Posts: 8
Joined: Wed Nov 03, 2010 10:35 am

Re: SMTP JCL

Postby Robert Sample » Fri Nov 05, 2010 1:19 am

//A255209J JOB MSGCLASS=X,MSGLEVEL=(1,1),CLASS=T,
// REGION=5M,NOTIFY=&SYSUID
//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
helo yourmvs
mail from: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
rcpt to: <jagadishan.p@gmail.com>
Cc: <rick@gmail.com> This is not allowed -- CC recipients must be RCPT TO: and have the CC after the DATA statement
Subject: Hola Invalid here -- must occur AFTER the DATA
Content-type: text plain; Invalid here -- must occur AFTER the DATA
data
Jags: guten tag. was ist ihre namn.
stardator ist kuss. Always
hej hej.
.
quit
/*
//SYSUT2 DD SYSOUT=(B,SMTP) B depends on the site. SMTP is the started task name and depends on the site.
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//....
Robert Sample
Global moderator
 
Posts: 2751
Joined: Sat Dec 19, 2009 8:32 pm
Location: Atlanta, GA


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post