Creating a single fixed width record data format
To create a new data format for a single fixed width record:
- Open Format Designer.
- Click Create new data format.
-
Complete this general information:
- Format Type
- Select Single Fixed Width Record.
- Name
- Specify a unique name for the new data format.
- Description
- Optionally, specify a description for the new data format.
- Click the TML Details tab.
-
Complete this information about separators:
- Initial lines to ignore
- The number of lines to ignore at the start of the external file. The default is 0.
- Record Separator
- The type of separator used at the end of each record in the
external file. Select from:
- Windows New Line
- Unix New Line
- Other
Specify a parameter as the record separator, for example, \t for tab.
The default separator is Windows New Line. It is displayed in the script as record-sep="\r\n". That is, carriage return and new line.
-
Specify the fields included in the format:
- Click the Upload a file browse button to import existing field names from an example file. The field names are extracted and inserted into the rows, replacing any field names you have already defined.
-
Click Add to add a new
field.
Note: The start position is automatically generated. It is calculated as Start + Length from the previous record.
- Specify the length of the field, that is, the number of characters reserved for that field.
- Specify the name of the field. Note: These must conform to XML syntax. For example, field names must not start with numeric characters. Field names must also be unique within the field set.
- Select Ignore to remove this field from the output.
- Click Insert to add a new field inbetween two existing fields.
- Click the up and down arrows to change field positions. Or, you can click and drag a field to the desired position.
- Click Delete to delete a field.
-
Optionally, click the Script tab to
create or edit a format in text view.
Note: The script must form valid XML.
- Click Save Format.