Fixed Width Data In Source And Target Text Files

Text files can be used as a source or target datastore and are accessed using the Text File As A Source or Text File As A Target Connector. On the Source Text Connection — Entities Tab or the Target Text Connection — Entities Tab of the Text Connection dialog you can indicate that the text file you are using is Fixed Width. If you are using text files that contain Fixed Width data there are the following additional requirements: 

Fixed Width Data Examples

With Data selected for the First Row setting in the Text Connection Entities tab, TIBCO Scribe® Online assigns the initial field width for each field to be the width from the start of one field to the beginning of the next field. You can see this using the Query Block Preview tab in a Map that uses the Text as a Source Connection. See Block Properties Preview Tab.

For the last field, the field is the width of the header. For example, if you assume 5 spaces between each heading:

FirstName     LastName     Age
Hadrian       Wall         Unspecified
Joan          Darcy        53

The field widths are:

Create Sample Data Fields

Note: Do not create fixed width files by exporting data from Microsoft Excel to a .prn file. Saving in .prn can cause errors in your data.

Related Topics

Source Text Connection — Fields Tab

Target Text Connection — Fields Tab

Editing Fields In Fixed Width Data Text Files