cscbinaryparse (Mutually transforming DOM and binary data)
- Organization of this page
Format
(1) To directly specify the arguments in the command
cscbinaryparse -format path-of-binary-format-definition-file -infile path-of-input-data-file -outfile path-of-output-data-file [-inverse] [-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] [-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
cscbinaryparse -f path-of-binary-parse-command-properties-file
Function
Transforms DOM 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.
-
Directly specify the arguments in the command
Specify the arguments when executing the command. If the -f option is also specified, all the directly specified arguments are invalid and the arguments in the binary-parse command properties file specified in the -f option are valid.
-
Specify the command arguments in a file
Enter the command arguments in the property format in the binary-parse command properties file, and then specify the file name in the -f option.
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
-format path-of-binary-format-definition-file
Specifies the path of the binary format definition file (.fdx) as an absolute or relative path. You cannot omit this argument.
-infile path-of-input-data-file
Specifies the path of the input data file as an absolute or relative path. You cannot omit this argument.
You can specify any of the following data types:
-
Binary data
-
Either of the following DOM data (XML)
-
DOM data generated from binary data by using DOM transformation
-
DOM data that complies with the XML schema file generated by using the cscfdx2xsd command with the binary format definition file (specified in the -format option) specified
-
-outfile path-of-output-data-file
Specifies the path of the output data 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 specified path, the existing file is overwritten. If there is no file with the specified name, a new file is created.
-inverse
Specifies the transformation operation between binary data and DOM data. You can omit this argument.
-
If this argument is specified:
DOM data is transformed to binary data.
-
If this argument is not specified:
Binary data is transformed to DOM data
-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 binary-parse 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 |
Binary-parse command properties file |
csctransform.uoc.class |
3 |
cscbinaryparse 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.
-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 character code conversion of 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-binary-parse-command-properties-file
Specifies the path of the binary-parse command properties file as a relative or absolute path. If this option is specified, any other options are ignored.
- Binary-parse command properties file
-
This file contains the arguments of the cscbinaryparse command specified in the Java property file format. The available character code is UTF-8 only.
For details about how to define the binary-parse command properties file, see 3.14.5 Binary-parse command properties file.
Return value
Return value |
Meaning |
---|---|
0 |
Normally terminated. |
1 |
Abnormally terminated. |
Notes
-
If a stack overflow or OOM (Out Of Memory) occurs during execution of the command, specify the Java VM start options in the system environment variable CSC_DATA_TRANSFORM_OPT to set the values for the stack area and heap area.
The following describes the Java VM start options you can specify in the system environment variable:
Java VM start option
Description
-Xms
Initial value of the heap area (New area + Old area)
-Xmx
Maximum value of the heap area (New area + Old area)
-Xss
Stack size of the thread
-XX:MetaspaceSize
Standard value for Full GCs that originate in the Metaspace area
-XX:MaxMetaspaceSize
Maximum value of the Metaspace area
-
If you use a wildcard to specify a path, operations are not guaranteed.