Components > Fixed-width file formats > Creating a fixed-width file format
  

Creating a fixed-width file format

Create a fixed-width file format so that you can use a fixed-width file as a source or target in a mapping.
When you specify format options for a fixed-width file format, use a sample file. The data in the sample file appears on the page to help you determine the appropriate format options for your data. The format options that you specify don't alter or save the sample file.
    1Click New > Components > Fixed Width File Format and then click Create.
    Alternatively, to edit a fixed-width file format, on the Explore page, navigate to the fixed-width file format. In the row that contains the fixed-width file format, click Actions and select Edit.
    2Enter the following fixed-width file format details:
    Property
    Description
    Configuration Name
    Name of the fixed-width file format.
    Location
    Location of the fixed-width file format. Browse to the folder where you want to store the fixed-width file format or use the default location.
    If the Explore page is currently active and a project or folder is selected, the default location for the asset is the selected project or folder. Otherwise, the default location is the location of the most recently saved asset.
    Description
    Description of the fixed-width file format.
    3Specify the following connection details for the sample flat file:
    Property
    Description
    Sample File Connection
    Connection to the sample file that you use to specify the fixed-width format.
    Sample File
    Sample file that you use to specify the format options.
    Sample file data appears in the Preview (Before) section.
    4Add fields in the Fields section. To add a field, click Add and then configure the following properties:
    Property
    Description
    Field Name
    Name of the field.
    Width (characters)
    Field width in bytes. One byte is equal to one character.
    Type
    Datatype of the field.
    Date Format
    Date format to use for the field. Overrides the default format set for the fixed-width format. Enter only the date format. For example, YYYY-MM-DD
    Scale
    Number of digits to the right of the decimal point of a number. For example, the number 123.45 has a scale of 2. Scale must be greater than or equal to 0.
    The maximum scale for a numeric data type is 65535.
    Not editable for all data types.
    As you configure each field, you can see how changes affect your sample data in the Preview (After) section. The configurations you specify don't alter the sample file.
    5In the Advanced Properties section, specify the following properties:
    Property
    Description
    Rows to Skip at Start
    Number of initial rows to skip. For example, you might want to skip blank rows or header rows.
    Process File Line-by-Line
    Ends each row with a newline character. Must be enabled when you use a fixed-width file format for a flat file source or target object. Default is Yes.
    Bytes to Skip After Field
    Number of bytes between the last column of one row and the first column of the next.
    Null Value Type
    Whether the null character is text or ASCII. Default is Text.
    If you plan to use the fixed-width format for a flat file target, select Text. If you use an ASCII character, Data Integration uses an asterisk (*) at runtime in flat file targets.
    Null Value Character
    Character to represent a null value.
    Use Repeated Null Character
    Reads repeat null characters in a single field as a single null value. Default is No.
    Date Format
    Date format to use for the fixed-width format. Overrides the date format specified in the connection. To specify the default date format, click Configure and enter the following information:
    • - Whether the field width is adjusted or fixed.
    • - The field width in bytes.
    • - The date format.
    Remove Trailing Spaces
    Removes trailing spaces from string values. Default is Yes.
    6To save the fixed-width file format, click Save.