Get CPU time using REXX.

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
Technocrat
Registered Member
Posts: 31
Joined: Thu Oct 03, 2013 1:32 pm

Get CPU time using REXX.

Post 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?
Regards
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

Re: Get CPU time using REXX.

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Get CPU time using REXX.

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”