Reference > Utilities


txttransform utility

This utility transforms data between a character-delimited variable format and an XML format.

Before running this utility configure the loading utilities.

Filenames specified as parameters for this utility can be preceded by relative or absolute paths. Relative paths must be relative to the directory from which you run the txttransform utility.

This utility produces the following log file:

Run this utility as the non-root WebSphere Commerce user ID. Do not run this command as root.


Utility command

The txttransform utility has the following file name:


Parameter values

The following required values are specified and separated by commas in a parameter file ( parameter.txt):

Input file

Name of the character-delimited variable format file to be transformed.

Schema file

Name of the XML schema file to be used in the transformation.

Output file

Name for the output XML file in which the transformed data will be stored.

Transformation method

Method to be used in adding the data to the output file. The following methods are valid:

Create

Create a new XML file from the text file.

Append

Append new XML data to an existing XML file.

Encode

The character encoding scheme of the input file. Any character encoding scheme supported by Java can be specified. This parameter is optional. The default character encoding scheme is UTF-8, and will be used if a value for this parameter is not specified.

All of these parameters are required, except for Encode parameter, which is optional. The parameters must be specified in the order listed. If the order of parameters in the parameter file does not match the order of parameters listed, the txttransform utility will fail.

For example, to create a new XML file (catalog.xml) from a UTF-8 encoded comma separated value (CSV) file (sample.csv) using the schema defined in an XML schema file (sample_schema.xml), the parameter file for the txttransform utility would contain the following line of text:

sample.csv,sample_schema.xml,catalog.xml,Create,UTF8


Related concepts

Overview of the mass load utilities

Transforming, loading, and extracting data using the WebSphere Commerce loading utilities


Related tasks

Configure the environment variable setting scripts

Transforming character-delimited text to XML

Related reference

dtdgen utility

massextract utility

idresgen utility

massload utility (Server environment)

xmltransform utility


+

Search Tips   |   Advanced Search