Sample Export File from SMF 110 Subtype 2 Records
It's easy to report on SMF data!
Spectrum SMF Writer handles the difficult SMF record parsing for you automatically. You just specify which fields you want to see.
Spectrum SMF Writer also converts the arcane date and time fields and reformats them into an attractive report.
The sample SMF export program below was created with Spectrum SMF Writer, the low-cost 4GL SMF report writer.
In this example, we want to read CICS statistics data and output it in KEY=VALUE format. (For example: DATE=2017/12/22). This file will subsequently be used in another mainframe application.
Here is an explanation of some of the statements in the program below.
An OPTION statement specifies that we want to create a mainframe export file (as opposed to a report, or a comma delimited PC export file.) Another option specifies the data formats that we want our "values" to appear in. We also specify a large LRECL for the output file so that there is room for many pairs of values in each record.
Our INPUT statement specifies that we want to invoke the SMF file definitions for type 110 subtype 2 records. (See SMF 110-2 record layout.) The INCLUDEIF statement then selects just these type 110-2 CICS Statistics records from the SMF file.
Our COLUMNS statement then outputs the "KEY=" part of each data pair as a single literal field. We follow that with the name of an SMF 110-2 field whose value we want to follow the KEY= text in the record. Since mainframe files default to having "0" blanks between columns, we specify an explicit spacing factor of "1" between the pairs of KEY=VALUE.
That's all it takes to turn SMF data into a useful KEY-VALUE mainframe file.
All of this with just a dozen lines of code!
Why not install a Spectrum SMF Writer trial right now and start making your own SMF reports!