IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to send the email about failure of Job Notification


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Apr 19, 2007 12:33 pm
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
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
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Apr 19, 2007 2:44 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts help send file AFT CONTROLM EM IBM Tools 0
No new posts how to send 10 rows at a time to output CICS 2
No new posts how to solve this power failure shutd... ABENDS & Debugging 5
Search our Forums:

Back to Top