Page 1 of 1

Get CPU time using REXX.

Posted: Wed Dec 16, 2015 1:35 pm
by Technocrat
Hi

I am trying to create a small REXX which can calculate or pick the CPU time for a Job. To do this when I look at the job log of a Job, it shows like this:

Code: Select all

IEF403I JOBAAA11 - STARTED - TIME=10.09.53 
* 
* 
IEF404I JOBAAA11 - ENDED - TIME=10.12.18 

While for the same job, in JESYSMSG the results are like this:

Code: Select all

CPU:  0 HR  00 MIN  03.42 SEC    SRB:  0 HR  00 MIN  00.18 SEC

Why different times are reported. What is 0 HR 00 MIN 03.42 SEC indicates? If it not related to Started-time and Ended-time then where does it come from?

Re: Get CPU time using REXX.

Posted: Wed Dec 16, 2015 3:28 pm
by enrico-sorichetti
because they are different time measurements

started and ended give the ELAPSED time
the other gives the CPU time

that' s all

Re: Get CPU time using REXX.

Posted: Sun Dec 20, 2015 3:01 am
by Robert Sample
I think you need to do more research before attempting your REXX code. The job you posted ran for 2 minutes 25 seconds (from 10:09:53 to 10:12:18) and the program used 3.42 seconds of CPU time in those 2 minutes 25 seconds. However, the system used .18 seconds of CPU time for that program (which is what the SRB time represents) so the total CPU allocated to that job by z/OS was 3.60 seconds of CPU time. If you don't understand the difference between TCB CPU seconds and SRB CPU seconds, you definitely don't know enough to write REXX code yet.