Interpreting the SMF user records

An Assembly Language macro instruction called CHCSMFRC is provided in the SMP/E SCHCMAC target data set. This macro instruction can be used in Assembly Language programming to generate the DSECTs that describe the content of the SMF user records.

The macro instruction has the following syntax:

[label] CHCSMFRC [LIST={YES|NO}],[NOTES={YES|NO}]

The LIST keyword indicates whether a listing of the DSECTs should be produced (YES) or suppressed (NO) in the Assembly Language output listing. The default is YES.

The NOTES keyword indicates whether the general use notes for the DSECTs that are generated by the macro instruction should be produced (YES) or suppressed (NO) in the Assembly Language output listing. The default is YES.

The macro instruction generates a large number of DSECTs to describe the various data sections that make up the SMF user record.

The SMF user records are written using the "minimum" (historical) z/OS® SMF record header. A DSECT for this common SMF record header is not produced by the CHCSMFRC macro instruction. A DSECT for the minimum SMF record header can be generated by using the z/OS IFASMFH macro instruction with SMFHDR=YES coded. Immediately following the minimum SMF record header is the CDC for Db2® for z/OS SMF user record header. From this point forward the term "record header" will refer to the CDC for Db2 for z/OS SMF user record header, not the minimum z/OS SMF record header.

Within the single SMF record type assigned, CDC for Db2 for z/OS writes two categories of SMF user records: Status category and Performance category. A single SMF user record is either a Status category record or a Performance category record. The CHCSMFRC macro instruction only produces DSECTs for the Performance category record content. Status category records are detected by using content in the record header. Customer SMF reporting can ignore them if they are encountered. They do not carry any information that would be useful for customer reporting.

The SMF user record consists of the following areas in this order:

  • The z/OS SMF minimum record header.
  • The CDC for Db2 for z/OS SMF record header. This header appears once in an SMF user record. It contains information that describes the instance of CDC for Db2 for z/OS that produced the SMF user record. It also states the category (Status or Performance) of the SMF user record and the entity that produced the SMF user record, and contains the number and extent of the task data segments that follow this record header for the tasks that comprise the functional entity.
  • The task data segments. This segment appears multiple times, once for each task type for which data is being reported for the functional entity. Each task data segment consists of a segment header that describes the type, version and extent of the segment in the SMF user record, and the segment's task data content.

There are no slack bytes in the record header or in any of the task data segments. Fields that would normally have a certain alignment will have that alignment suppressed in order to eliminate slack bytes.

Task data segments that describe the data that is written by the different task types might not be present in some SMF user records based on the category and entity values in the record header and type and entity status modifier in the segment headers. As maintenance is applied to CDC for Db2 for z/OS, certain task data segments might be added or removed from certain functional entity SMF user records. A corresponding update to this documentation will occur at the time of issuing the maintenance to describe this change, and the maintenance level that is described by this document will be stated in the introductory pages of this section. Programming logic should verify the number and types of task data segments that appear in the different functional entity SMF user records, and indicate a programming error if there is a discrepancy between the SMF user record encountered and the documentation provided here.

Task data segments that describe the data written by the different task types do not appear in the SMF user record in any particular order. When coded logic is "walking" over the task data segments in a record, each segment must be identified by the segment header's content and not by its position in the SMF record.

The record header and segment headers contain a version number. As maintenance is applied to CDC for Db2 for z/OS that modifies the structure of the record header's or the task data segment's format or content, the version number is set to a new value. When processing a record header or segment header, programming should always check the version number in the record header or segment header and verify that it corresponds to the version number of the respective part's description that was assembled into the program logic.

Where maintenance has provided an updated version of a record header or segment, the new version number and data layout of the changed description of the record header or segment is supplied in the CHCSMFRC macro instruction. The prior version's description is not provided or maintained. It is the programmer's responsibility to determine what these changes are and adjust his or her programming accordingly.

Where time values are provided in the SMF user record as CPU or elapsed time, they are provided in units of microseconds. Time values in the SMF user record for latency times are provided in units of hundredths of seconds.

The DSECTs that are produced by the CHCSMFRC macro instruction are the source for information about the specific content of the record header and task type segments, and their varying content and relationships to the various function entity SMF user records that are produced.