SEGOFF

Read syntax diagramSkip visual syntax diagram
>>-SEGOFF(adjustment)------------------------------------------><

Can only be used in criteria for a segmented template.

Returns the current offset into the record during segmented identification processing.

adjustment
Default 0. This is a positive or negative number that is added to the offset value returned.

For example, consider the excerpt from an XML template with identification criteria for a section of the SMF 30 record SMF30PSS. The offset to the section is in the header section SMFRCD30 field SMF30SOF. We use related identification criteria with an adjustment of 4 because the header section includes the RDW which Z Data Tools does not include when processing data. The header section is defined with an offset of minus 4 and we use SEGOFF(4) to adjust current offset in Z Data Tools processing by 4 so the returned value can be compared with the offset value contained in the SMF30SOF field.

<layout name="SMFRCD30" offset="-4">
  <criteria type="RID" rname="SMF30PSS">
    <exp><![CDATA[
      segcnt('smf30pss') < #SMF30SON &
      segoff(4) >= #SMF30SOF &
      seglen('SMF30SLN') > 0
    ]]></exp>
  </criteria>
</layout>