Page 1 of 1

Calculation of batch run times

PostPosted: Thu Sep 04, 2008 11:09 am
by martinf7031
Hi everyone,

I hope you are all doing well today. I need some assistance with calculations that needs to be done for batch jobs. I do an extract from the logs using the IEF403I (start) and IEF404I (end) messages. I write the into a file and populate another file later in the process with some more stats. The file containing the start time looks like this:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
OCDO0002 - STARTED - TIME=00.25.31
******************************** Bottom of Data ********************************

The file containing the end time looks like this:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
OCDO0002 - ENDED - TIME=01.29.15
******************************** Bottom of Data ********************************

It is currently 2 different files and I concatinate them in a later process for the report. However I will propably have to get these values into one file to the the calculation of the runtime of the job, which is not a problem.

My questions are:
1. What utility can I use to do these calculations?
2. If the job abends/fail, I will pick up more that one start and finish message from the log. How do I extract the first record from the started messages in the populated file like in the above examples, and the last ended message in the populated file like the other above example?

Thank you for your support, it is much appreciated.

Regards,
Martin

Re: Calculation of batch run times

PostPosted: Thu Sep 04, 2008 7:00 pm
by Bill Dennis
1. Can you capture the JOB# part of the record to use for matching start/ends?

2. Be aware that sometimes the job crosses midnight and the end time is LESS so you need to add 24 hrs per day.

3. What utility? Do you have EZTRIEVE or DYL280?

Re: Calculation of batch run times

PostPosted: Thu Sep 04, 2008 10:26 pm
by martinf7031
Hi Dennis,

Thank you for your reply, it's much appreciated.

1. Yes I already capture the job# in an earlier step, so that is already in place.

2. Thanks for the tip. How will I go about to make sure that this is automatically done in that step?

3. We have EZTRIEVE.

Thanks for your help so far.

Regards,
Martin

Re: Calculation of batch run times

PostPosted: Fri Sep 05, 2008 2:46 am
by Bill Dennis
Just using lines from the JOBLOG makes it difficult to detect date changes. I usually process SMF records for this kind of report because the start/end dates are there.

Re: Calculation of batch run times

PostPosted: Fri Sep 05, 2008 12:08 pm
by martinf7031
Thanx Bill. Can you pleas tell me what SMF records I should be looking out for? Are there a specific code I need to trap for a start time and finish time of a job?

Regards,
Martin

Re: Calculation of batch run times

PostPosted: Fri Sep 05, 2008 7:06 pm
by Bill Dennis
The SMF 5 record is the basic job report record. It has date/time for job submit, start exec and end exec. If your site collects type 30 rec, they have more fields. The 30 has sub-types for job, step and interval records. The MVS System Management Facility (SMF) manual has the layouts.

Re: Calculation of batch run times

PostPosted: Mon Sep 08, 2008 12:01 pm
by martinf7031
Thank you Bill, I will go and have a look at the layouts and let you know. Thank you for the help, it is much appreciated.