SMFWTM — Writing SMF records

The SMFWTM macro is used to write records to the SMF data set. You can use this macro in any exit routine that is supervisor state except for IEFU83, IEFU84, IEFU85, IEFU86, and IEFU29, and in any application program that is APF-authorized.

All SMF records are given to installation exits before they are written to the SMF data set. If you use SMFWTM, installation exits IEFU86 and IEFU83 are invoked.

For records of all types, you must complete the record descriptor word (RDW), and the record type must be provided in the standard or extended header, in accordance with record type requirements described in the Standard and Extended SMF record headers section.

Record types 0 - 127, and 1152 - 2047, which are SMF-formatted records are reserved for IBM® products. For these record types SMF supplies the date and time and system ID in the standard header, and the extended TOD clock and time zone offset in the extended header, if used.

Record types 128 - 255 are available for user-written records. When writing these record types, you must provide all of the information in the standard header, including the date, time, and system identifier. While the system identifier can be any four character identifier, specifying the value of the SID parameter is consistent with the system records SMF produces. For user-written records, SMF supplies the extended TOD clock and time zone offset in the extended header, if used.

If properly defined to the system, all SMF records are given to installation exit IEFU86 and then to installation exit IEFU83 before they are written to the SMF data set or log stream.

Syntax

[label] SMFWTM {record address|(r)}

Parameters

record address
The symbolic address of the record to be written.
(r)
A a register containing the address of the record to be written. The value for r can be either the absolute register number or a symbol for the register. In either case, you must code the parentheses, for example, (2) or (REG2).

Return codes

When the SMFWTM macro returns control, register 15 contains one of the following return codes.
Code dec(hex)
Meaning
00 (00)
The record was written without error.
08 (08)
The record was not written because the length specified in the RDW was less than 18 bytes, or an SMF record exit changed the length in the RDW to be less than 18 bytes.
16 (10)
The record was not written because SMF is not active or has ended abnormally.
20 (14)
The record was not written because the installation-written IEFU83 exit routine suppressed the record.
24 (18)
The record was not written because the data was lost.
36 (24)
The record was not written because the record specified is not currently being recorded.
40 (28)
The record was not written because a buffer shortage problem caused the data to be lost.
44 (2C)
The record was not written because SMF could not establish recovery.
52 (34)
SMF cannot write this record because of an SMF record flooding filter.
56 (38)
Record not written because the record contains a malformed record header for an extended record type. See the Generating records with Extended headers section for the rules for generating a record with an extended header.
60 (3C)
Record not written because the record was modified by an installation exit (IEFU83, IEFU84, IEFU85, or IEFU86) to contain a malformed record header for an extended record type. See the Generating records with Extended headers section for the rules for generating a record with an extended header.