You are currently on IBM Systems Media’s archival website. Click here to view our new website.

MAINFRAME > Tips & Techniques > Application Development

Leveraging SMF Data With (or Without) REXX

Editor’s note: This article is the first in a series exploring how to process Systems Management Facilities (SMF) data using the REXX programming language.

SMF is IBM’s data-collection facility for accounting and performance data on z/OS. Different SMF records are created for all functions within the z/OS system and its related subsystems. The information within each SMF record is extensive, and covers most aspects of task and system functions.

Several programs use SMF data, such as the IBM z/OS Resource Measurement Facility (RMF) component, SAS and MXG. Although these programs provide the functionality to eliminate much of the need to write programs to process SMF data, they have their limitations and as such there are times when programming is preferable.

This series on using REXX to process SMF data, will touch on the following topics:

  1. An introduction to SMF terminology and data structures
  2. REXX building blocks
  3. More on the SMF record structure
  4. How to process commonly used SMF record types

This first installment reviews a few SMF concepts and terminology to lay the groundwork before delving in to how to process SMF records using REXX.

Standard SMF Record Header

The z/OS system collects statistical data for each task when certain events occur in the life of the task. SMF formats the information that it gathers into system-related (or job-related) records. System-related SMF records can include information about the configuration, paging activity and workload. Job-related records include information on the CPU time, SYSOUT activity, and data set activity of each job step, job, APPC/MVS transaction program and TSO/E session. SMF data is written to the SYS1.MANx data sets.

Each record written to the data set by the SMF writer routine contains the standard SMF record header. It contains information about the record, such as type, subtype (if the record includes subtypes), length, and the time and date the record was written to the data set.

Record subtypes are used to group related data and control record types. For example, one record might contain three separate subtypes, each reporting different kinds of data. By using those subtypes you can eliminate the need for three separate record numbers.

Each SMF record is assigned a record type where types 00-127 are reserved for IBM products and types 128-255 are available for user records. The SMF record header can be either 18 bytes (if no record subtype exists) or 24 bytes (if one does exist).

Looking closer at the SMF record header, Figure 1 shows the format of the 24-byte header per the SMF documentation (SA22-7630).

From a graphic data structure perspective, the SMF record header would look like Figure 1A.

The fields in Figure 1A represent a standard header present in all SMF records. The remainder of the record is interpreted according to the record type SMFxRTY.

Viewing SMF Records

You might occasionally find it necessary to view the SMF records that are produced. Printed SMF records are useful, for example, when designing and implementing a user-written record-processing program or when diagnosing problems with RMF reports. There are two ways to print the records:

  • The RMF utility program ERBSCAN running under Interactive System Productivity Facility (ISPF), which can format all SMF/RMF records in record-type-specific sections
  • The standard utility program IDCAMS, which can print all SMF records in dump format


ERBSCAN is a utility that when issued against an SMF dataset, presents a list of SMF records and some very high level information gleaned from the record header. This includes the date and time the record was cut, the SMF ID and the record type and subtype. Figure 2 shows a typical ERBSCAN display.

George Ng is a senior certified I/T managing consultant for IBM Systems and Technology Group Lab Services at IBM Poughkeepsie. His areas of focus include z/OS Parallel Sysplex, High Availability and Performance.



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

A Beginner's Guide to the REXX Programming Language on z/OS

Reading and Writing Files in the REXX programming language on z/OS.


Application Management is Important to the Entire Process


Application Testing: Giving Users What They Need

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
Mainframe News Sign Up Today! Past News Letters