File structure

  1. Select the File Structure window to see a preview of your parsed file.
    Note Before parsing a file, specify the rules to recognize records and their fields within a file.
    • A template can define one or more record types.

    • The multiple record types can be hierarchical for XML files.

  2. On the File Structure window, Overall file structure section, set the header and footer parameters.

    Complete the overall file structure options.

  3. In the Records section, define any repetitive records in your files.
  4. Click Add record to open the record detail window.
  5. Set a preference to define how to parse a record:
    • Any non-empty lines after the header: Record parsing starts from first non-empty line.

    • Record starting from: Parse all lines after the one that begins with the specified symbols.

    • Include first string: If selected, parse the record from the line with the symbols; if not, start parsing on the next line.

    • Until first empty line: If selected, the record ends on next empty line.

    • Block of lines, starting from: Parse lines that start with the specified symbols, and these lines follow each other. If the line starts from another symbol, this block is finished.

    • Line length between _ and _ characters: Parse lines that have the specified length.

    • Line has _ occurrences of_: Parse lines that have a specified number of occurrences for symbols.

    • The record uses indent of _: Parse lines that have the specified indent. The indent may consist of spaces or tabs.

    • First row is record header: The first row in the file contains the names of the columns.

    • Accept incomplete lines: If a line in the file has fewer fields than expected, indicate if such a line should be skipped, or if the existing values should be accepted.

    • Ignore line prefix _: The lines could start with some fixed prefix, such as "Transaction:" or just a couple of spaces.

  6. Save the changes.
  7. In the Ignore lines section, select which lines to ignore:
    • Lines starting from: Ignore lines that start with the specified symbols.

    • Lines which include: Ignore lines that contain the specified symbols.

    • Empty lines: Ignore empty lines.