Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Tue Sep 28, 2004 3:13 pm Post subject: CPU time of every step. |
|
|
Hi all,
I have a requirement to get the CPU time used by every step in my job. I would not have more than 5-6 steps; most of them DB2 queries/PROCs.
I have searched here and elsewhere and have made two conlcusions. The first one is to use TCBTTIME of TCB or, use SMF record type 30 (sub-record type 4).
I have few questions related to the above. Can someone answer these please?
The TCBTTIME would give me the accummulated TCB time in a 64-bit integer. Is this the CPU time taken by the step that queries TCBTTIME? In other words, if I have an ASM program to query TCBTTIME as fourth step, would it give me the TCBTTIME until the third step or of the fourth step alone? The word 'accummulated' is confusing me.
If I go the SMF way, then the starting point should be accessing the SYS1.MANx datasets. But, whether it is active or backed-up some place else, the volume of data to be 'parsed' would be huge. Isn't it so? If yes, then is SMF approach acceptable? (Note that, the requirement is not one-off. While there is no set frequency as of now, it would not be sporadic or highly infrequent.)
I searched the Data Areas manuals. But, I might have missed. Is there a place in the Data Areas that would hold the CPU time taken by a step?
Are SDSF utilities a better alternative? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
Posted: Sun Oct 03, 2004 1:19 am Post subject: |
|
|
The TCBTTIME does not hold a cumulative value; ie: the value for Step4 might be less than that for Step1. You would need to access this field once at the end of each Step.
Don't know anything about the SMF way. It doesn't sound clever.
The two DSECTS for accessing the TCB are in SYS1.MACLIB. "CVT" will point you towards the TCB, and "IKJTCB" will map it.
Also Gilbert Saint-Flour's COB program accesses this field. Maybe you can use this, and your task will be easy. The only drawback of this program is that it uses hard-coded displacement values instead of symbolics. |
|