Use cases: Determining the starting point of an SMF field
The basic structure of an SMF record generally consists of two sections:
* __ 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:

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:
- 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.
- 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.
- 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

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

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:
- GOffset locates the starting point (the first operand, GTriplet(X'5C' 0)) of the subsection that contains the required field.
- 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. - 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

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
