Fixed Width Reader

The Fixed Width Reader allows you to import text files with a fixed width column format.

A Fixed Width Text file has a set number of fields, which are delineated by their position within the file. This is illustrated by the red lines in the screen-shot below.

Determining Field or Column Indexes

When setting up the Fixed Width Reader each field must be manually defined using the start position and width/number of characters.

To assist with this process most text editors will have a status area (usually at the bottom of the screen) which indicates the current position of the cursor. Use the column position of your cursor to help set the ‘Starting Field Position’ and the ‘Field Length’ properties of the field.

The screen shot below is taken from Notepad. The Cursor position can be shown by enabling the Status Bar from the View menu.

Reader > File Layout

The options tab is where the file options for the Fixed Width Read transform are specified.

Transform Id

The unique user-defined name for the transform.

Data Source

The controller type is defined here. This is the source from where the Fixed Width Text files will be read, which can be Email, File or Http.
See Input/Output Controllers (IO Controller) for more information.

Controller Options

This is the expandable options section beneath the Data Source drop-down. These options change according to the data source selected.

See Input/Output Controllers (IO Controller) for more information.

Header Rows

The fixed number of rows at the start of the file which are filled with content that is not data, e.g. company logo.

Hierarchical Data Support

The Fixed Width Reader supports the Ordered Hierarchy.

The first X number characters denote the Record Type for on each record. The screenshot of the data below shows the first two characters of the file denoting the Record Type, where there are FS, FI, UI & EF record Types.

Hierarchy Setup

Hierarchical Dataset

When checked indicates the data being read is an Ordered Hierarchical dataset.

When checked the Field Mapping tab will display additional fields for arranging the fields.

Record Type Field Length

The number of characters at the start of the file denoting the file is hierarchical.

Hierarchy Detection Results

Pressing the Refresh button will cause IMan to parse the file(s) to detect the different record types.

Reader > Field Mapping

Unlike CSV, Database and Excel data readers, the Fixed Width Text Reader does not support schema detection.

Therefore, it is necessary to define each of the columns, by adding these fields manually.

Transaction Identifier

If a Hierarchical Data dataset, each Transaction detected in the file will be listed in this drop-down; if it is a flat dataset, only one Id will appear here. Selecting an Id from this list will open it for editing.

Changing the selected Id on this drop-down will save the currently active Id and open the newly selected transaction into the field mapping grid.

Transaction Id

The Transaction Id can be edited here, if the user chooses. To see changes made to this Id, it is necessary to close off the setup window, and load it again from the Transform Setup screen.

Parent Id (Hierarchical Datasets Only)

The Parent Id specifies which immediate parent the selected transaction id is associated.

Select from the drop down the desired parent to build the logical hierarchy.

Delete Field

To delete a field highlight the corresponding record in the grid and press the Delete Field button at the bottom of the grid.

Reader > Field Mapping > Edit

Field Name

The name of the field.

Field Type

The data Field Types of the field.

Starting Field Position

The number or character of the first field of data within the record's column.

Field Length

The number of characters in the record.