View previous topic :: View next topic
|
Author |
Message |
sudheer_kumar
New User
Joined: 27 Dec 2005 Posts: 16
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
COND checking does not work for JCL errors. |
|
Back to top |
|
|
donevin
New User
Joined: 07 Jun 2005 Posts: 70 Location: South Africa
|
|
|
|
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 |
|
|
sudheer_kumar
New User
Joined: 27 Dec 2005 Posts: 16
|
|
|
|
Thanks Donevin. Could you please send the sample JCL for this. |
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
donevin
New User
Joined: 07 Jun 2005 Posts: 70 Location: South Africa
|
|
|
|
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 |
|
|
|