Tip

Using DFH$MOLS with CMF performance records

Robert Crawford, Contributor

For every transaction run on your system you can also see, among other things, CICS Monitoring Facility (CMF) performance records are very comprehensive and detailed. The transactions can show how much CPU it consumed under each TCB, how long it used the network along with the amount and type of file I/O's.

Of course there's some bad news. First, because there's one record for each transaction, you often have to wade through millions of them to find the one you want. Second, they're written in an odd format that is difficult to navigate, especially in higher level languages. The easy answer is to buy a product to break down and analyze the records.

However, not all of us have that option given the software budgets we have to live with. That's where DFH$MOLS comes in.

IBM distributes DFH$MOLS with CICS and documents its usage in the Operations and Utility guide. A quick look at the manual will show you that DFH$MOLS has two functions; PRINT and UNLOAD. Along with these functions, there are other keywords and commands you can use to include or exclude the records based on things like CICS APPLID, transaction ID, date and time.

My favorite function is UNLOAD. Unloading CMF records changes them from an unseemly mess into a flat record format easily read and reported on by any high-level language or a reporting system like SAS. The layout of a standard record is documented in DFHSAMP member DFHMNPDA.

However, you have to be a little careful about

    Requires Free Membership to View

translating the fields in DFHMNPDA into your own programs. First, be careful to note the length and type of each field. Second, most of the fields you'll be interested in, for example CPU, are in eight byte "clock" fields. A clock field is actually two four byte fields stuck together. The first four bytes is a count of sixteenths of a microsecond, so you have to multiply it by 16 before you use it. The second four bytes is a 24 bit counter of the number of times an interval was added to the first four bytes. My best advice is to consult the CICS performance guide if you have any questions about a field's length, format and meaning.

Of course, DFH$MOLS can't unload CMF records on its own. One of the reasons CMF data is difficult to use is it is self-defining. Each CMF record begins with a list of "connectors" followed by the data fields. Each connecter has a number identifying its corresponding data field along with the offset of that data in the data field group. DFH$MOLS ties the connectors and the fields together by referencing a CMF dictionary record. The dictionary record lists each field's number, name and format. So, to process each record, DFH$MOLS gets the field ID out of the connector and looks it up in a saved dictionary record. From the dictionary entry DFH$MOLS knows all about the field and how to print or move it into an unloaded record.

The contents of CMF records and the dictionary record are heavily dependent on the Monitoring Control Table (MCT) of the CICS they came from. CICS spits out a dictionary record every time it comes up. Alas, sometimes the interval of CMF records you want to look at doesn't contain a dictionary record, which is why IBM supplies utility DFHMNDUP. DFHMNDUP will produce one CMF dictionary record using as input a CICS name, system ID and MCT suffix. Because CMF dictionary records are so important, at our shop we use DFHMNDUP to generate a dataset containing just dictionary records for all our regions. Then we put this dataset at the front of the concatenation of SMF files we want to run through DFH$MOLS.

As useful as DFH$MOLS is, there are still some things that need changing. Happily, IBM ships the source in DFHSAMP. Thus, by looking through the source and finding the right spot you can make changes for a friendlier utility.

Some suggestions would be:

  • The ability to specify generic APPLID's
  • The ability to select which fields to unload
  • To include fields besides the defaults DFH$MOLS knows about.

DFH$MOLS is far from perfect. Its control language is rudimentary and the record selection statements don't allow you to specify generic resources. It also tends to be unforgiving of mistakes and will ABEND after writing a terse message to the console. But, with a little set up and maybe a little customization, it can be a cheap way to delve into the rich, dense information provided by CMF performance records.

About the author: Robert Crawford has been a CICS systems programmer for 24 years.

This was first published in February 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.