Recording Rule Configuration Files

The Silk Performer recorder can be configured to generate correct WebTcpipRecvUntil calls for the TN3270e protocol automatically using a recording rule configuration file.

Two different rules must be specified: in the first part of the session where the session parameters are negotiated, 0xFF F0 is used as the termination sequence, while 0xFF EF serves as the termination sequence in the 3270-DATA part of the session.

These two parts can be distinguished by checking the first byte of the response data. In the first part, it is equal to 0xFF (Telnet code IAC - "Interpret as Command"), while it is equal to 0x00 (Code 3270-DATA, compared to the TN3270e response header above) in the second part.

The resulting recording rule XML file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<RecordingRuleSet>
  <TcpRuleRecvUntil>
    <Name>Telnet session start</Name>
    <Identify>
      <TermData>&#xFF;&#xF0;</TermData>
      <IgnoreWhiteSpaces>false</IgnoreWhiteSpaces>
    </Identify>
    <Conditions>
      <CompareData>
        <Data>&#xFF;</Data>
        <ApplyTo>Left</ApplyTo>
        <Offset>0</Offset>
      </CompareData>      
    </Conditions>
  </TcpRuleRecvUntil>
  <TcpRuleRecvUntil>
    <Name>3270-DATA</Name>
    <Identify>
      <TermData>&#xFF;&#xEF;</TermData>
      <IgnoreWhiteSpaces>false</IgnoreWhiteSpaces>
    </Identify>
    <Conditions>
      <CompareData>
        <Data>&#x00;</Data>
        <ApplyTo>Left</ApplyTo>
        <Offset>0</Offset>
      </CompareData>      
    </Conditions>
  </TcpRuleRecvUntil>
</RecordingRuleSet>