Fixed-length format files
Loading fixed-format data into the database requires that you define the target data type for the fields and the locations within the record.
You do not have to load all fields in a fixed-length format file. You can skip them by using the "filler" specification. The order of fields in the data file must match the order in the target table, or you must create an external table definition, which specifies the order of the fields as database columns. An external table definition in combination with an insert-select statement allows the field order to be changed.
Unknown or null values are typically represented by known data patterns, which are classified as representing null.
Data attributes
- Data type
- The data at a particular offset in a record is always of the same type.
- Representation
- The representation is constant, and each field has a fixed width. Data within a field is always presented in the same way. Certain items such as radix points, time separators, and date delimiters are always at the same place and are typically implied, rather than being present in the data file.
- Value
- The value can be an actual value or a null indicator. Data representations that indicate a null value are specified by the layout definition. This assumes that null is allowed.
- Length
- There is no length specification within the data file, because length in the file is fixed and the length attribute is specified by the layout definition.
- Nullness
- Nullness is identified in the layout definition as either a specific data pattern, such as all spaces, or as being flagged by a value in another column.