(Originally posted 2016-03-08.)
Here are are two questions people would like easy answers to:
- What are the big CPU DB2 jobs accessing this DB2 subsystem?
- Which job steps access MQ?
This post shows you how to answer both these questions without DB2- or MQ-specific instrumentation.
The “without DB2- or MQ-specific instrumentation” phrase is important: I’m working with a customer with something like 50 DB2 subsystems and many MQ subsystems. You can’t really take product-specific SMF from all of those.
But most installations collect SMF 30 data, which is what this method relies on.
In fact I’ve just enhanced our tools to make these two questions easy to answer – with single table queries.
The key to this is the SMF 30 Usage Data Section:
- For DB2 the Product Name field is “DB2” and the Product Qualifier is the DB2 subsystem name. The system is obviously the one that cut the record.
- For MQ it’s only slightly more complicated: If the Product Qualifier is “FREDBATC” the MQ subsystem is “FRED”. The Product Name contains “MQ”.
With these simple rules it’s easy to write the queries that answer the questions at the top of the post.
You can also use this method with IMS, with only very minor modifications. My current customer engagement, though, doesn’t include IMS.
There is a little subtlety here (and the news isn’t very good):
We usually detect dependencies between jobs by examining the access to data sets:
- For Non-VSAM data sets this would be examining “write” (SMF 15) versus “read” (SMF 14).
- For VSAM data sets it’s SMF 64 (CLOSE) statistics.  We examine the individual statistics deltas in the record.
This is fine for data-set-driven dependencies.
You can’t use these records for DB2- or MQ-driven dependencies. The bad news is you can’t get dependency information from SMF 30 either. For this you have to examine the appropriate Accounting Trace records:
- SMF 101 for DB2.
- SMF 116 for MQ.
And neither of these tell you what other job (step) this one is dependent on. You just get evidence of write and read activity, which helps.
So Batch remains complex and therefore interesting. But the technique in this post – examining SMF 30 Usage Data – can help make sense of large numbers of jobs very easily.
In the study that inspired this post we can readily see which DB2 subsystems support the “big CPU” jobs and we needed that to direct our DB2 specialist to focus his attention on just these of the many subsystems this customer has (even on a single system) .
SMF 62 is an OPEN record But it’s statistics aren’t helpful here. ↩