View previous topic :: View next topic
|
Author |
Message |
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
Hi,
I need to send auto generated mail if job run more than one hour.
Please help me how to do in JCL? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You want to know how to determine if a job has been running for more than one hour? |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
no this is my requirment
i am running one job
if the job is running more than one hour i will send mail to all
its like a alert mail
so i want to know how to fetch time from spool |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
raviprasath_kp wrote: |
no this is my requirment
i am running one job
if the job is running more than one hour i will send mail to all
its like a alert mail
so i want to know how to fetch time from spool |
I would look at the job scheduling software your shop is using, this sounds like something that could detect. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
There are plenty of posts related to running SDSF in batch or REXX. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You might also change the program to (periodically) check the current time against the start time and if the elapsed time is greater than 1 hour, submit JCL thru the internal reader that generates/sends the e-mail.
If there is scheduling software in use on your system, i'd look at using that before inventing some process. . . |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
dick scherrer wrote: |
Hello,
You might also change the program to (periodically) check the current time against the start time and if the elapsed time is greater than 1 hour, submit JCL thru the internal reader that generates/sends the e-mail.
If there is scheduling software in use on your system, i'd look at using that before inventing some process. . . |
Of course if your program isn't working properly then you might never get to the check of the current time. |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
ok,how to get the start time from spool to cobol |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This question
Quote: |
ok,how to get the start time from spool to cobol |
is not clear.
Are you asking about some job that ran previously and you want the time from the queued output?
Are you asking about the currently running program/job?
If you are talking about the job that is currently running, you do not get the time from the spool - you get it from the system (before the program even opens any of the files). From then on, periodically get the time from the system and compare it against the start time. When the time of execution exceeds one hour, do whatever is needed at that time. |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
thanks time
how to get time from system for running job |
|
Back to top |
|
|
|