Field Offsets
When processing fixed format text, you must specify the line length and the column offsets. This allows a Parse Data or Render Data activity to determine where columns and lines begin and end. The Field Offsets tab allows you to specify the format of fixed-width text.
The line length is the total length of each input line, including the line separator character(s). Include the appropriate number of characters for the selected line separator on the Configuration tab to the total length of each line.
The column offset is the starting and ending character position on each line for the column. Each line starts at 0 (zero). For each column of the line, you must specify the name of the data item associated with this column (this is the same name you specified for the corresponding element in the data schema), the starting offset for the column, and the ending offset for the column.
When you define each column offset to begin where the last column offset ends, the data can be read more quickly by ActiveMatrix BusinessWorks because the bytes of the input records can be read in sequentially.
Consider the following text file. The first two lines of the file indicate offset numbers (each 0 indicates another 10 characters), and the fill character between columns is spaces:
0 12 30 45
0123456789012345678901234567890123456789012345678901234567
57643 Smith Chris Account
57644 Jones Pat Marketing
57645 Walker Terry Develpment
Fixed-width text strings and field offsets illustrates the Field Offset tab for the file above. Notice that the line length is specified as 60, even thought the offsets end at character number 58. The line separator is specified as "Carriage Return/Line Feed (windows)", so this adds two additional characters for a total line length of 60.
Figure 96: Fixed-width text strings and field offsets