Self-defining section

The self-defining section, which follows the writer header, contains pointers that enable you to find the product and data sections, which contain the actual trace data.

Begin program-specific programming interface information.

Each pointer is a descriptor that contains fields, which are:

  • A fullword that contains the offset from the beginning of the record to the data section.
  • A halfword that contains the length of each item in the data section. If this value is zero, the length of the items are varied.
  • A halfword that contains the number of times that the data section is repeated. If the field contains 0, the data section is not in the record. If it contains a number greater than 1, multiple data items are stored contiguously within that data section. To find the second data item, add the length of the first data item to the address of the first data item (and so forth).
Pointers occur in a fixed order, and their meanings are determined by the IFCID of the record. Different sets of pointers can occur, and each set is described by a separate DSECT. Therefore, to examine the pointers, you must first establish addressability by using the DSECT that provides the appropriate description of the self-defining section. To do this, perform the following steps:
  1. Compute the address of the self-defining section.

    The self-defining section begins at label SM100END for statistics records, SM101END for accounting records, and SM102END for performance and audit records. It does not matter which mapping DSECT you use because the length of the SMF writer header is always the same.

    For GTF, use QWGTEND.

  2. Determine the IFCID of the record.

    Use the first field in the self-defining section; it contains the offset from the beginning of the record to the product section. The product section contains the IFCID.

    The product section is mapped by DSNDQWHS; the IFCID is mapped by QWHSIID.

    For statistics records that have IFCID 0001, establish addressability using label QWS0; for statistics records having IFCID 0002, establish addressability using label QWS1. For accounting records, establish addressability using label QWA0. For performance and audit records, establish addressability using label QWT0.

After establishing addressability using the appropriate DSECT, use the pointers in the self-defining section to locate the record's data sections. End program-specific programming interface information.