WRITE.FIXEDWIDTH

Write data to a text format, with columns at fixed horizontal positions and widths.

Properties

From

Name of the Input Data Source.
The input-source must always be from the neutral Table-format.

To

Name of the Output Data Source.
The output-source can contain either a File-path, a PBinaryStream object or a .Net Stream object. See https://perfion.atlassian.net/wiki/spaces/PIM/pages/244330412 for more information's and examples.
The format of the output will written as a text-file with data, and possibly headers, at fixed horizontal positions and widths.

Parameters

@Context

Specifies in which form to produce data in the document.
The context is specified as follows: 'Positions/Header/NumberFormat/DateFormat'

  • Positions: 22,32,60,75 comma separated list of positions of the start of next column

  • Header
    1 with header (default)
    0 no header

  • NumberFormat
    , comma will be used as decimal separator (no 1000 separators are used)
    . period (default) will be used as decimal separator (no 1000 separators are used)

  • DateFormat
    d-M-yyyy

Shortcuts
In addition to the above complete specification, the following shortcuts are available instead of specifying Number and Date formats. Positions must always be specified.
us set all above to what they typically are in the USA
da set all above to what they typically are in Denmark (like most of Europe)
Example: 22,32,60,75/da

@WriteFileIfInputIsEmpty

If the number of rows in the Data Source is zero, it is possible to control if the command should write a empty file or not. The value can be true or false and the default value is true. (Introduced from Perfion 2023 R1)

Map

No mapping can be done with this command. This Command is only meant to serve the final step of converting data to be saved in the output-format, to a File-path or send it to a Stream.
If you need to map data use one of the many other Commands such as e.g. SELECT or SELECT.UNIQUE before using this command.