Adding a field to a record

Use this procedure to add a field to a record.

  1. In the Message Definition view, expand a Record component and right-click the Fields component and select New Child > Field to add a new field to a record or a second field. The child field is positioned after an existing field.
  2. Verify that the new field is added correctly.
    Note: If the last field of a record has a variable length, then use the value -1 as its field length. If a record contains only one field and the length of the field is set to -1, then you can also set the start position of the field to -1. You can use this value if you only parse records and use custom Java code in the mapping to parse fields for the record. You can use this method for advanced flat files where fields do not have fixed positions, but are instead positioned depending on the data.
    If the message field delimiter of the flat file definition message is blank, then the field's start position is computed automatically. For the initial addition of the first field of the message, the start position is set to 1. For the succeeding fields, the start position is based on the previous field's start position and length. If a new field is added between two fields, then the start position is not computed automatically.