Standard and Extended SMF record headers

Each record written to the SMF data set by the SMF writer routine contains the standard and extended SMF record header. The header length for records without subtypes is 18 bytes (see Table 1). The header length for records with subtypes is 24 bytes (see Table 2). The header length for records with Version 1 is 32 bytes (see Table 3).

The header contains information about the record, such as: record type, record subtype (if the record includes subtypes), record length, and the time and date the record was written to the data set or log stream. The time in the header record is based on the local time. 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.

The header section must include the record descriptor word (RDW). The RDW is a 4-byte field that must introduce each SMF record when it is written to the SMF data set or log stream by the SMFWTM macro instruction. The first two bytes of the RDW must contain the length of the logical record (including the four bytes of the RDW). The second two bytes are used for variable blocked spanned records; that is, records that contain more than 32,756 bytes. This field (the second two bytes) is set to zero if the record is not spanned. The remainder of the record immediately follows the RDW.

Because the record formats include the RDW, it is not necessary to add four bytes to the offset listed in the record; however, depending on the access method used to read the record from the SMF data set, these fields might not be present in your SMF record. You might have to subtract four bytes from the offsets listed in your record.

Standard SMF record header without subtypes

Table 1 shows the header mapping for records without subtypes.
Table 1. Standard SMF record header for records without subtypes
Offsets Name Length Format Description
00 00 SMFHDR_Len 2 binary Record length (maximum size of 32,756). This field and the next field (total of four bytes) form the record descriptor word (RDW). The first two bytes (this field) must contain the logical record length including the RDW.
02 02 SMFHDR_Seg 2 binary Segment descriptor provide by SMF. Initialize with zeros.
04 04 SMFHDR_Flag 1 binary System indicator:
Bit
Meaning when set
0-2
Reserved
3
MVS™/SP Version 4 and above. Bits 3, 4, 5, and 6 are on.*
4
MVS/SP Version 3. Bits 4, 5, and 6 are on.
5
MVS/SP Version 2. Bits 5 and 6 are on.
6
VS2. Bit 6 is on.
7
Reserved.

*IBM recommends that you use information located elsewhere in this record to determine the MVS product level.

05 05 SMFHDR_Rty 1 binary Record type (hexadecimal values are 0 - FF).
06 06 SMFHDR_Time 4 binary Time since midnight, in hundredths of a second, record was moved into the SMF buffer. In record types 2 and 3 this field indicates the time that the record was moved to the dump data set.
10 0A SMFHDR_Date 4 packed Date when the record was moved into the SMF buffer, in the form 0cyydddF (where c is 0 for 19xx and 1 for 20xx, yy is the current year (0 - 99), ddd is the current day (1 - 366), and F is the sign). In record types 2 and 3, this field indicates the date that the record was moved into the dump data set.
14 0E SMFHDR_SID 4 EBCDIC System identification (from the SID parameter).

Standard SMF record header with subtypes

Table 2 shows the header mapping for records with subtypes.
Table 2. Standard SMF record header for records with subtypes
Offsets Name Length Format Description
00 00 SMFHDR_Len 2 binary Record length (maximum size of 32,756). This field and the next field (total of four bytes) form the record descriptor word (RDW). The first two bytes (this field) must contain the logical record length including the RDW.
02 02 SMFHDR_Seg 2 binary Segment descriptor provided by SMF. Initialize with zeros.
04 04 SMFHDR_Flag 1 binary System indicator
Bit
Meaning when set
0
Reserved.
1
Subtypes are valid.
2
Must be off if a standard header is present. See the commentary of SMFxRTY for more information on this bit.
3
MVS/SP Version 4 and above. Bits 3, 4, 5, and 6 are on. (IBM® recommends that you use record type 30 to obtain the MVS product level.)
4
MVS/SP Version 3. Bits 4, 5, and 6 are on.
5
MVS/SP Version 2. Bits 5 and 6 are on.
6
VS2. Bit 6 is on.
7
Reserved.
05 05 SMFHDR_Rty 1 binary Record type (hexadecimal values are 0 - FF). When this field contains the value 126 (hexadecimal 7E), and bits 1 and 2 of the flag byte at offset 4 into the header are on. then version 1 of the Extended SMF Record Header must be present, and the actual record type will reside in SMFHDR1_Ext_Rty.
06 06 SMFHDR_Time 4 binary Time since midnight, in hundredths of a second, that the record was moved into the SMF buffer. In record types 2 and 3, this field indicates the time that the record was moved into the dump data set.
10 0A SMFHDR_Date 4 packed Date when the record was moved into the SMF buffer, in the form 00yydddF or 0cyydddF (where c is 0 for 19xx and 1 for 20xx, yy is the current year (0 - 99), ddd is the current day (1 - 366), and F is the sign). In record types 2 and 3, this field indicates the date that the record was moved to the dump data set.
14 E SMFHDR_SID 04 EBCDIC System identification (from the SID parameter).
18 12 SMFHDR_WID 4 EBCDIC Subsystem identification. This field is a four byte character value set by the SUBSYS=option specified in the SMF macros.
22 16 SMFHDR_STP 2 Binary Record subtype (hexadecimal values are 0 - FF). See SYS and SUBSYS with TYPE and NOTYPE — Selecting subtypes for SMF recording for a description of subtype selectivity.

Extended SMF record header Version 1

Table 3 shows the header mapping for extended records with version 1.
Table 3. Extended SMF record header version 1
Offsets Name Length Format Description
0 0 SMFHDR1 _LEN 2 Binary RDW record length. This value must be at least 56 (hexadecimal 36).
2 2 SMFHDR1 _SEG 2 Binary RDW record segment descriptor.
4 4 SMFHDR1 _FLAG 1 Binary Flag byte.
Bit
Meaning when set
0
Do not use or set.
1
Subtypes are valid. This bit must be on.
2
Extended header is present. This bit must be on.
3 - 7
Do not use or set.
5 5 SMFHDR1 _RTY 1 Binary Record type, must be 126.
6 6 SMFHDR1 _TIME 4 Binary Time since midnight, in hundredths of a second, record was moved into the SMF buffer. In record types 2 and 3 this field indicates the time that the record was moved to the dump data set.
10 A SMFHDR1 _DATE 4 Binary Date when the record was moved into the SMF buffer, in the form 0cyydddF (where c is 0 for 19xx and 1 for 20xx, yy is the current year (0-99), ddd is the current day (1-366), and F is the sign). In record types 2 and 3, this field indicates the date that the record was moved into the dump data set.
14 E SMFHDR1 _SID 4 EBCDIC Subsystem identification.
18 12 SMFHDR1 _WID 4 EBCDIC System identification.
22 16 SMFHDR1 _STY 2 Binary Record subtype , values 0-32.767 (hexadecimal 0-7FFF).
24 18 SMFHDR1 _LEN 2 Binary Length of the remainder of this section, must be 32 (hexadecimal 20).
26 1A SMFHDR1 _VERSION 1 Binary Extended header version, must be 1.
27 1B SMFHDR1_ FLAG 1 Binary Flag byte
Bit
Meaning when set
0
The IEFU86 exit was called for this record. Set by IBM.
1 - 7
Reserved. Set to 0.
28 1C SMFHDR1 _STCKE 16 Binary Time when the record was written, in STCKE format. Set by IBM.
44 2C SMFHDR1 _TZO 8 Binary Time zone offset, taken from CVTLDTO. Set by IBM.
52 34 SMFHDR1 _EXT_RTY 2 Binary Extended Record type, values 0-2047 (hexadecimal values 0-7FF).
54 36   2 Binary Reserved. Set to 0.