The smf_record callable service writes an SMF record to the SMF data set. The caller must be permitted to the BPX.SMF resource profile in the FACILITY class or must be APF-authorized.
The service can also be used to determine if a particular type or subtype of SMF record is being recorded. This avoids the overhead of data collection if the SMF record is not going to be recorded.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1SMF): | 31-bit |
AMODE (BPX4SMF): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4SMF with the same parameters. The Smf_record_address parameter is a doubleword.
The name of a fullword that contains the SMF record type. See z/OS MVS System Management Facilities (SMF) for information on SMF record type and SMF record layout.
The name of a field that contains the SMF record subtype. See z/OS MVS System Management Facilities (SMF) for information about SMF record type and SMF record layout.
The name of a field that contains the SMF record length.
The name of a fullword (doubleword) that contains the starting address of the SMF record to be written, or zero. If it contains zero, SMF is tested to determine if a particular record type or subtype is being recorded.
The name of a fullword in which the smf_record service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EINVAL | The value that was specified for an operand was incorrect. The following reason code can accompany the return code: JRSMFBadRecordLength. |
ENOMEM | Not enough storage is available. The following reason code can accompany the return code: JRNoStorage. |
EPERM | The calling process is not permitted to the BPX.SMF resource in the FACILITY class and the calling processes is not APF authorized. The following reason code can accompany the return code: JRSMFNotAuthorized. |
The name of a fullword in which the smf_record service stores the reason code. The smf_record service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no related services.
The caller must be permitted to the BPX.SMF resource profile in the FACILITY class.
For an example using this callable service, see BPX1SMF (smf_record) example.