Calculation of batch run times



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Calculation of batch run times

Postby martinf7031 » Thu Sep 04, 2008 11:09 am

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
martinf7031
 
Posts: 5
Joined: Tue Jun 03, 2008 2:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby Bill Dennis » Thu Sep 04, 2008 7:00 pm

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?
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby martinf7031 » Thu Sep 04, 2008 10:26 pm

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
martinf7031
 
Posts: 5
Joined: Tue Jun 03, 2008 2:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby Bill Dennis » Fri Sep 05, 2008 2:46 am

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.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby martinf7031 » Fri Sep 05, 2008 12:08 pm

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
martinf7031
 
Posts: 5
Joined: Tue Jun 03, 2008 2:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby Bill Dennis » Fri Sep 05, 2008 7:06 pm

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.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calculation of batch run times

Postby martinf7031 » Mon Sep 08, 2008 12:01 pm

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.
martinf7031
 
Posts: 5
Joined: Tue Jun 03, 2008 2:48 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post