View previous topic :: View next topic
|
Author |
Message |
madhushreehp
New User
Joined: 19 Jun 2009 Posts: 4 Location: Bangalore
|
|
|
|
Hi,
Currently, I have a requirement where in I need to capture the current date and time of the job run and last job run date and time and compute the difference in between the two runs to compare it with a field value.
Is there a way of capturing last job run date and time as well as present job run date and time??
Kindly let me know. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Unfortunately your requirement is not quite clear.
Please elaborate on the requirement, and also some insight into the need for this may help us offer a solution. |
|
Back to top |
|
|
madhushreehp
New User
Joined: 19 Jun 2009 Posts: 4 Location: Bangalore
|
|
|
|
I can better explain you with an example.
Say for example I have a job JCL1 that runs many times a day. Suppose JCL1 runs 2 times today.i.e; 19/06/2009 on 8 AM in the morning and
it is running now.
Then, I need to get the current date and time of run..say 19/06/2009 and 3:40 PM.
And, also the last job run date and time..that is 19/06/2009 and 8.00 AM.
Is there a way of getting these details thru jcl? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I would suggest establishing some kind of central control file;
would contain a minimum of two fields (vsam)/ columns (db2).
each time the job is run - 'move current-run-date field/column to last-run-date field/column
- populate the current-run-date field/column
- compare
.
if you are expecting to scroll thru SMF data or something to determine the last run date---you are being unrealistic.
a scheduler may be able to provide a last run date for a job.
and a last question---why do you have to do this? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What I was really after was the need to know when the last execution was. |
|
Back to top |
|
|
madhushreehp
New User
Joined: 19 Jun 2009 Posts: 4 Location: Bangalore
|
|
|
|
Actually, there is a front-end java application for which I am doing the batch processing.
There are different screen which has diff fields. when the user enters value on the screen, they will be stored in the DB2 tables.In one such screen, there is a field value min duration between the 2 runs ( the value of which will be entered by the user and it is stored in the DB2 table).
To validate this field, i need to get the jcl last run date and time and the jcl current run date and time.Compare those two and if this is less than the value present in the table for this field min duration between the 2 runs, I have to cancel the present run..else continue with the process. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sounds as if that db2 table which contains "min duration between the 2 runs"
should also contain "last-run-date-time", which would be populated by the batch job. |
|
Back to top |
|
|
madhushreehp
New User
Joined: 19 Jun 2009 Posts: 4 Location: Bangalore
|
|
|
|
Okay...Thanks!! This solves my problem:) |
|
Back to top |
|
|
|