Hitachi

uCosminexus Service Platform Reference Guide


csctransform (Testing data transformation)

Organization of this page

Format

(1) To directly specify the arguments in the command

csctransform -xsl path-of-XSL-file-(mapping-definition)
             -informat path-of-input-format-definition-file
             -infile path-of-input-file
             -outformat path-of-output-format-definition-file
             -outfile path-of-output-file
            [-uocclass class-name-of-character-code-conversion-UOC
             [-uocproperty path-of-self-defined-file-for-character-code-conversion-UOC]]
            [-codetablerootpath root-path-of-code-conversion-table-storage-path]
            [-validate]
            [-debugtrace [-debugtracefilepath path-to-output-debug-information]]
            [-cscdtsysprop path-of-system-properties-file-for-data-transformation]
            [-undefinedcode {ERROR|REPLACE}]

(2) To specify the command arguments in a file

csctransform -f path-of-data-transformation-command-properties-file

Function

Transforms XML format data to binary data or vice versa, and then outputs the transformation result to a file.

This command is saved in the following location:

service-platform-installation-directory\CSCTE\bin

When executing the command, move to this location or specify the path.

The following two methods are available for specifying arguments of the command:

If the system environment variable COSMINEXUS_HOME is not set correctly, executing the command causes an error.

Arguments

(1) To directly specify the arguments in the command

-xsl path-of-XSL-file-(mapping-definition)

Specifies the path of the XSL file (mapping definition) as an absolute or relative path. You cannot omit this argument.

-informat path-of-input-format-definition-file

Specifies the path of the input format definition file as an absolute or relative path. You cannot omit this argument.

You can specify files whose extension is .xsd (XML format) or .fdx (binary format).

-infile path-of-input-file

Specifies the path of the input file as an absolute or relative path. You cannot omit this argument.

-outformat path-of-output-format-definition-file

Specifies the path of the output format definition file as an absolute or relative path. You cannot omit this argument.

You can specify files whose extension is.xsd (XML format) or .fdx (binary format).

-outfile path-of-output-file

Specifies the path of an existing output file as an absolute or relative path. If the output destination directory does not exist, an error occurs. You cannot omit this argument.

If a file with the specified name exists in the path, the existing file is overwritten. If there is no file with the specified name, a new file is created.

-uocclass class-name-of-character-code-conversion-UOC

Specifies the class name of the character code conversion UOC by using a fully qualified name. You can omit this argument.

The class name of the character code conversion UOC can also be specified in the system properties file for data transformation, in addition to this argument and the data-transformation command properties file. If the specifications are duplicated, the specified value is applied according to the following priority:

Priority

Property file or command name

Relevant property or argument

1

System properties file for data transformation

csc.dt.ownCodeConverter.className

2

Data-transformation command properties file

csctransform.uoc.class

3

csctransform command

-uocclass

For details about the csc.dt.ownCodeConverter.className setting in the system properties file for data transformation, see 3.14.2 System properties file for data transformation.

To use the character code conversion UOC, you need to specify a JAR file of the character code conversion UOC in the system environment variable CSC_DATA_TRANSFORM_CLASSPATH. When invoking a class defined in an external JAR file from a custom function or character code conversion UOC, you also need to specify the relevant JAR file in the environment variable.

-uocproperty path-of-self-defined-file-for-character-code-conversion-UOC

If the -uocclass option is specified, this argument specifies the path of the self-defined file for the character code conversion UOC as an absolute or relative path. You can omit this argument.

If the -uocclass option is not specified, this argument is invalid. If you specify the -uocclass option and omit this argument, the class of the character code conversion UOC is executed without reading the self-defined file during data transformation.

-codetablerootpath root-path-of-code-conversion-table-storage-path

Specifies, as an absolute or relative path, the root path of the storage path of the code conversion table to be used by the code conversion library. You can omit this argument.

-validate

Specify this argument to perform the following schema validation.

  • Perform schema validation for input files (XML) by using an input format definition file (XML Schema).

  • Perform schema validation for output files (XML) by using an output format definition file (XML Schema).

You can omit this argument.

-debugtrace

Specify this argument to output debug information. You can omit this argument.

-debugtracefilepath path-to-output-debug-information ~ <<current directory in which the command was executed>>

If the -debugtrace option is specified, this argument specifies the output destination path of debug information as an absolute or relative path. You can omit this argument.

If this argument is not set, if the output destination is not specified, or if the specified directory does not exist, debug information is output to the current directory in which the command was executed.

-cscdtsysprop path-of-system-properties-file-for-data-transformation

Specifies the path of the system properties file for data transformation as an absolute or relative path. You can omit this argument.

The system properties file for data transformation contains the system properties specified for data transformation in Service Platform. For details about how to specify the system properties, see 3.14.2 System properties file for data transformation.

-undefinedcode {ERROR|REPLACE} ~ <<ERROR>>

Specifies the operation to be performed when an undefined character code is detected during code conversion for binary data. You can omit this argument.

You can specify one of the following values:

  • ERROR

    When an undefined character code is detected, an error occurs and the processing ends.

  • REPLACE

    The character code of undefined portions is converted to a blank character code, and the processing continues.

(2) To specify the command arguments in a file

-f path-of-data-transformation-command-properties-file

Specifies the path of the data-transformation command properties file as a relative or absolute path. If this option is specified, any other options are ignored.

Data-transformation command properties file

This file contains the arguments of the csctransform command specified in the Java property file format. The available character code is UTF-8 only.

For details about how to define the data-transformation command properties file, see 3.14.1 Data-transformation command properties file.

Return value

Return value

Meaning

0

Normally terminated.

1

Abnormally terminated.

Notes