Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is it possible to send an email message when a JOB aborts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
gpowell382

New User


Joined: 25 Aug 2005
Posts: 31
Location: USA

PostPosted: Wed May 09, 2007 12:28 am    Post subject: Is it possible to send an email message when a JOB aborts
Reply with quote

I have a requirement to send an email message when the previous job aborts. I am using z/OS 01.07.00 JES version JES2 - JES level S 1.7 -TSO version 3.6.0. Is there a set up? It goes to EOJ, but does nothing.
I tried the following:

Code:

//JS10    EXEC PGM=IKJEFT01,
//             DYNAMNBR=100,
//             REGION=1M
//ABNLNODP  DD DUMMY
//SYSIN     DD DUMMY
//SYSTSIN   DD *
XMIT (N O D E).SMTP FI(MAIL) SEQUENTIAL NOEPILOG NOLOG NOPROLO
/*
//MAIL      DD *
HELO (N O D E)
MAIL FROM: <USER ID@N O D E>
RCPT TO:   <EMAIL address>
DATA
FROM:      Email address
TO:        Email address
SUBJECT:   IKJEFT01 HAS BEEN RUN.
IKJEFT01 HAS BEEN RUN.
.
QUIT
/*
//SYSTSPRT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
Back to top
View user's profile Send private message

Frederic Lavoie

New User


Joined: 07 May 2007
Posts: 6
Location: Ottawa

PostPosted: Wed May 09, 2007 12:47 am    Post subject:
Reply with quote

Have you tried the IF (ABEND) in the JCL?


Code:
//*
//STEP01 PGM=prog1
//*
//IFCC1 IF  (ABEND)                                                     
//      THEN
//SNDEMAIL EXEC SMARTSND                                               
//*                                                                     
//SMARTSND.MAIL     DD *     
AN ERROR OR ABEND HAS OCCURED! PLEASE VERIFY THIS JOB!                 
/*                                                                     
//IFCC1 ENDIF                                                           
//*
Back to top
View user's profile Send private message
gpowell382

New User


Joined: 25 Aug 2005
Posts: 31
Location: USA

PostPosted: Wed May 09, 2007 12:58 am    Post subject: No I haven't tried If (abend), but I will try it out
Reply with quote

Is there a manual or something? I to send a E-MAIL message to valid email address when this jobs aborts
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 1:42 am    Post subject:
Reply with quote

Hello,

You might use the COND=ONLY in the e-mail step. With this specified, the e-mail step will only execute if the job has abended.

The manual you want for condition codes is the JCL manual linked to form the "Manuals" link at the top of the web page.
Back to top
View user's profile Send private message
gpowell382

New User


Joined: 25 Aug 2005
Posts: 31
Location: USA

PostPosted: Fri May 11, 2007 6:31 pm    Post subject: Is it possible to send an email message when a JOB aborts
Reply with quote

I submitted the JCL to SMTP by itself and I cannot get it to email a message.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 11, 2007 8:23 pm    Post subject:
Reply with quote

Hello,

This has me a somewhat confused
Quote:
I submitted the JCL to SMTP by itself and I cannot get it to email a message.


How did you "submit the jcl to smtp by itself"? I would think that you submitted a job via JES? What error message(s) are being presented. Please clarify why you cannot get it to email a message.

I may have mis-read your original post - if you want to execute the email step when the "previous job" abends, i'd suggest that you do it in the same job, but only send the email when the job abends (COND=ONLY).

If you are testing the email step stand-alone and it is not "doing anything", look at all of the sysout datasets for any info. You will be ahead if you find an already working batch e-mail on your system, and use the same method for your execution.
Back to top
View user's profile Send private message
gpowell382

New User


Joined: 25 Aug 2005
Posts: 31
Location: USA

PostPosted: Mon May 14, 2007 8:36 pm    Post subject: Is it possible to send an email message when a JOB aborts
Reply with quote

I understand COND=ONLY, but is it possible to test this job step by itself.
Note: I have tried to run SMTP by itself and I did not receive an error message nor did I get a email. X=system name This is what I am getting
READY
XMIT XXXX.SMTP FI(MAIL) SEQUENTIAL NOEPILOG NOLOG NOPROLOG
INMX000I 0 message and 10 data records sent as 14 records to XXXXXX.SMTP
INMX001I Transmission occurred on 05/14/2007 at 11:03:40.
READY
END
Back to top
View user's profile Send private message
gpowell382

New User


Joined: 25 Aug 2005
Posts: 31
Location: USA

PostPosted: Fri May 25, 2007 12:15 am    Post subject: Is it possible to send an email message when a JOB aborts
Reply with quote

Thanks for your help, but I found out it is a security issue as to why I cannot send an email using SMTP
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 12:42 am    Post subject:
Reply with quote

Thank you for posting your finding.

It may help another person with a similar problem later.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us