Making The Connection?
MartinPacker 11000094DH Visits (171)
I wrote the last blog post on my way to my first SHARE conference. I’m writing this one on the way back.
So a big thank you to all who made me feel so welcome in Pittsburgh. In many cases it was good to meet up with long standing friends; In some cases people I’ve known a long time but never actually met. I hope I’ll be back1.
Right now the team is working on a customer study, one component of which looking at big batch CPU consumers. And I think I‘ve just solved a long-standing issue of interpretation. So I’m sharing the thought with you.
It concerns batch job steps with a TSO step program name - IKJEFT01, IKJEFT1B, or IKJEFT1A. There are two main cases here:
The latter are usually something like REXX, or they could be compiled / assembled programs called from the Terminal Monitor Program (TMP) in Batch.
It would be good to know which is which. So, there’s no use tuning the SQL of a job step that doesn’t go to Db2. You’re better off tuning the REXX or program code. As it happens, I am perfectly capable of tuning REXX programs; I’m not so hot at tuning SQL. In any case I’m looking to advise the customer as to which is indicated for any given heavy CPU step.
A Previous Method
Previously we would’ve used our code which matches SMF 101 (DB2 Accounting Trace) with SMF 30 Step-End records (Subtype 4) to detect whether a job step accesses a Db2 subsystem or not. This is the most comprehensive way but it’s quite likely Accounting Trace isn’t turned on for the subsystem the job step attaches to. Further, we don’t even know which subsystem it is.
So this is OK - and in practice we’ve used this method for a long time.
By the way, for TSO Attach Batch the Db2 Correlation ID is the job name2.
A More Scalable Method
There is a more scalable way of distinguishing between TSO job steps that access Db2 and those that don’t. And it’s more scalable because it doesn’t require Db2 Accounting Trace. Further, it yields the subsystem name.
It uses only SMF 30 records.
I’ve mentioned the SMF 30 Usage Data Section before: If an address space accesses Db2 the record will have at least one Usage Data Section pointing to Db2. The Product Name field will say “DB2” and the Product Qualifier field will contain the name of the subsystem. (The Product Version field will tell you which version of Db2 it is, which is also handy.)
Today I tested the following query:
‘Show me all the SMF 30–4 records with a Program Name field beginning “IKJEFT” and with a Usage Data Section that points to Db2."
This query only uses SMF 30. It ran quickly and produced an interesting list. It would be a small matter to turn this into the following query:
‘Show me all the SMF 30–4 records with a Program Name field beginning “IKJEFT” without a Usage Data Section that points to Db2."
The first query yields the first case above: TMP job steps that attach to Db2. The second query yields the other case: Non-Db2 TMP steps.
So now we can more usefully discuss any step whose Program Name begins “IKJEFT” - by working out which case it is.
I consider this a nice result - which is why I’m sharing it with you.
And, yes, if the step goes to Db2 we can dive into Accounting Trace to figure out: