Standard and Extended SMF record headers
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
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:
*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
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
|
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
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.
|
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
|
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. |