Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to send the email about failure of Job Notification

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sudheer_kumar

New User


Joined: 27 Dec 2005
Posts: 16

PostPosted: Thu Apr 19, 2007 12:26 pm    Post subject: How to send the email about failure of Job Notification
Reply with quote

How to send the email about failure of Job Notification , if the Job goes down with Jcl error in the prior step(Dataset not found).?
Please let me know as the if cond is working for abends only.

thanks
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 12:33 pm    Post subject:
Reply with quote

COND checking does not work for JCL errors.
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Thu Apr 19, 2007 1:21 pm    Post subject:
Reply with quote

You might want to add a step that does a LISTCAT on the filename and then test against the condition code of the LISTCAT step.
Back to top
View user's profile Send private message
sudheer_kumar

New User


Joined: 27 Dec 2005
Posts: 16

PostPosted: Thu Apr 19, 2007 1:28 pm    Post subject:
Reply with quote

Thanks Donevin. Could you please send the sample JCL for this.
Back to top
View user's profile Send private message
paul_007

New User


Joined: 03 Aug 2006
Posts: 33
Location: earth

PostPosted: Thu Apr 19, 2007 2:42 pm    Post subject:
Reply with quote

in our system we r using IEBGENER to send mail, here is the JCL:

//STEP2 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TPOIUTR.TEST.MAIL,DISP=SHR
//SYSUT2 DD SYSOUT=(A,SMTPC)
//

this is wat u shud code in sysut1 flat file

HELO C394TCP
MAIL FROM:<ZMAIL@GAIC.COM>
RCPT TO:<aaa@aaa.com
DATA
SUBJECT: aaaaaaaaaaaaaa
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="simpleboundary"

--simpleboundary

type here (only 80 record len)

--simpleboundary
Content-Type: text/plain
Content-Description: Text File Report
Content-Disposition: attachment; filename="lockboxReport.txt"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 2:44 pm    Post subject:
Reply with quote

paul_007

Please read the post and the replies carefully. If your notification step is the last in the job and the job fails with JCL error, as clearly stated by the OP, when will the notification step run ?

It will not run because the job has failed JCL error.
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Thu Apr 19, 2007 3:15 pm    Post subject:
Reply with quote

I hope this helps :
Code:
//LISTCT EXEC PGM=IDCAMS                                             
//*------------------------------------------------------------------
//* Read all filenames that adheres to this pattern from the catalog
//*------------------------------------------------------------------
//SYSIN    DD *                                                     
  LISTCAT ENT(HLQ.DISK.FLNME.VER.RECLNGTH) NAME                   
/*                                                                   
//SYSPRINT DD SYSOUT=*                                               
//*****************************************                         


This step returns 0 if the filename exists and 4 if it does not exist, so you can execute your next step conditionally.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts How to send email with Rich Text usin... santhosh5983 JCL & VSAM 4 Fri Apr 08, 2016 2:30 am
No new posts Email trigger through JCL Madhusudhan Prahlad JCL & VSAM 10 Mon Aug 31, 2015 3:43 pm
No new posts How to send MSGID & CORRELID for ... Sathiyendran Java & MQSeries 4 Mon Jul 20, 2015 2:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us