IBM Support

Text Translator used to convert Flat file to xml creates separate xmls for each line record

Troubleshooting


Problem

Text Translator used to convert Flat file to xml creates separate xmls for each line record

Symptom

Requirement: Read a .csv flat file to create an input xml for API (using a service in the SDF), such that every line creates multiple elements under the same root node.

The service is as below:

Start -> File I/O -> Text Translator -> XSL Translator -> API -> Stop

Error Message

No error; but each line record creates a new xml

Resolving The Problem

The problem is with the schema.xml being used by the service (Text Translator).

You would need to redesign this xml to expect new lines in the .csv as new <Terminal/>

(for ex. see <YFS_HOME>\documentation\code_examples\flatfile\delimitedReceiverSchema.xml in 7.x OR <INSTALL_DIR>\Foundation\xapidocs\code_examples\flatfile\delimitedReceiverSchema .xml in 8.x )

If you do not assign separate <Terminal/> for different lines, the end of line is treated as a new record.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Extensions","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Adapters","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Mapping and Translation","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

NFX6112

Product Synonym

[<p><b>]Severity[</b><p>];Normal

Document Information

Modified date:
16 June 2018

UID

swg21554505