CSV and Text Files
MapForce includes support for mapping data to or from text-based file formats such as CSV (comma-separated values) and FLF (Fixed-Length Field) text files. For example, you can create data transformations such as:
• XML schema to/from flat file formats
•Database to/from flat file formats
An FLF is a common text format where data is conventionally separated into fields which have a fixed length (for example, the first 5 characters of every row represent a transaction ID, and the next 20 characters represent a transaction description).
Note that, in case of CSV, your files can have as delimiter not only commas, but also tabs, semicolons, spaces, or any other custom values.
In addition to CSV and FLF files, mapping to or from text files with more complex or custom structures is possible using MapForce FlexText (this module is available in MapForce Enterprise Edition). FlexText essentially enables you to define the structure of your custom text data (using a so-called "FlexText template"), for the purpose of mapping it to other formats.
Mapping data to or from text files is supported in any one of the following languages: Java, C#, C++, or BUILT-IN.
There are two ways that mapped flat file data can be generated:
•By clicking the Output tab which generates a preview using the Built-in execution engine. You can also save the mapping result by selecting the menu option Output | Save output file, or clicking the icon.
•By selecting File | Generate code in | Java, C#, or C++ , and then compiling and executing the generated code.