Schema files
The Text Translator uses schema files, a type of XML file, that describe the structure of each flat file. The format of the schema determines how the data is translated by a service and should unambiguously determine the parsing of the flat file data.
File schemas are required on a per API per file format basis (for example, you may need to create a positional createOrder schema or a delimited createOrder schema), so you need to write least one unique schema per API you intend to execute.
The translation step can be independent of the source of the input data. The same data could arrive through a flat file store or through a JMS queue, and the translation specification applies in either case.
The schema file for byte count check is 0-based for the file header and 1-based for the file trailer. Therefore, you must take this into account when creating the file schema. When specifying the FileTrailerLength in the positional schema file, you must account for a new line if the file trailer ends with a new line. On UNIX, a new line has one byte, and on Windows a new line has two bytes. The length of the new line character has to be added to the FileTrailerLength.
The schema
file is stored in any location accessible as a CLASSPATH variable.
For sample schema files that correspond to the provided sample input
files, see the files in the <INSTALL_DIR>/xapidocs/code_examples/flatfile/
directory.
/error/
and /complete/
directories that contain errors or are unprocessed.