Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

Use cases: Determining the starting point of an SMF field


(SPE2401)

The following use cases provide examples for determining the starting point (or offset) of an SMF field. Use the starting point to return the address and length of a field value so that you can extract or interpret specific information from an SMF record.

You can determine the starting point by using Get specifications in the field DEF statements of the BMC AMI Datastream PARM member.

The basic structure of an SMF record generally consists of two sections:

* MVS SMF log
* __ SMF record
* __ __ smf header/self-defining section
* __ __ smf data section

Fields belong to the following sections:

  • SMF header or self-defining section, where offset values are hard-coded in the IBM SMF documentation
  • Subsections under the SMF data section, where offset values are either hard-coded in the IBM SMF documentation or stored in the SMF record

Examine the following use cases to find the starting point of SMF fields:

Use case: Determining the starting point of fields in the SMF header or self-defining section

The offset values for a field in an SMF record header or self-defining section are expressed from the start of the record descriptor word (RDW). The first field has an offset of zero.

For example, the following table shows fields that belong to an SMF record header section, the offset values, and the corresponding Get specification in the BMC AMI Datastream CZDnnnn PARM member. The first two fields (LLBB) are included for reference.

Offset

Field name

Get specification

0

Smf_len

Not applicable

2

Smf_seg

Not applicable

22

SubT

GBase(22 2)

24

SubtypeVersion

GBase(24 4)

To determine the starting point of the corresponding field, the GBase Get specification adds the offset value (the first operand) to the starting address of the SMF record.

The following image illustrates this scenario:

smfheadergetspec.png


Use case: Determining the starting point of fields in an SMF subsection with a fixed offset

The offset values for fields with a fixed offset in the SMF data section are expressed from the start of the subsection. Usually, subsections are addressed using the triplet fields in the self-defining section of the SMF record.

For example, the following table shows a field that is defined in a subsection:

Offset

Field name

Datastream Get specification

4

SysName

GTriplet(X'28' 4)

To determine the starting point of the corresponding field, the GTriplet Get specification performs the following actions:

  1. It adds the offset value (the first operand) to the starting address of the SMF record to determine the starting point of the triplet, which contains the actual offset value of the subsection under the data section from the starting point of the SMF record.
  2. It adds the offset value from the triplet to the starting address of the SMF record to determine the starting point of the subsection that contains the field.
  3. It adds the offset value of the field from the start of the subsection (the second operand) to the starting point of the subsection to determine the starting point of the field.

The following images illustrate this scenario:

Determine the starting point of the triplet

smfgetspectriple.png


Determine the starting point of the subsection and the starting point of the field

smfsubsection.png


Use case: Determining the starting point of fields in an SMF subsection with a variable offset

The offset values for fields with a variable offset in the SMF data section are expressed from the start of the subsection under the data section of the SMF record. Usually, subsections are addressed using the triplet fields in the self-defining section of the SMF record. However, the offset values for these fields are variable and stored within the same subsection of the SMF record.

For example, the following table shows a field that is defined in a subsection:

Offset

Field name

Datastream Get specification

variable

ClientApplId

GOffset(GTriplet(X'5C' 0) 18)

To determine the starting point of the corresponding field, the GOffset Get specification performs the following actions:

  1. GOffset locates the starting point (the first operand, GTriplet(X'5C' 0)) of the subsection that contains the required field.
  2. The second operand of GOffset is an offset for a 2-byte field from the starting point of the subsection.
    GOffset locates this field and retrieves the 2-byte value stored in it. The 2-byte value is the starting point of the subsection, the offset value of the required field.
  3. GOffset adds the offset value to the starting point of the subsection to get the field.

The following images illustrate this scenario:

Determine the starting point of the subsection

smfsubsectionvariable.png

The offset value from the triplet is X’569’, which is the offset value for the subsection, so the starting point of the subsection is 1+1385=1386.

In the following image, the 2-byte field within the subsection is located from the second parameter of GOffset. Finally, the required field is located with the help of the offset value retrieved from the 2-byte field.

Determine the starting point of the 2-byte field and the required field in the subsection

smfsubsectionvariable2byte.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Datastream for z/OS 7.1