Running the Utility

This section provides instructions for running the XML to X12 utility from the command line.

For Java:

java -DBBHOME=BBHomeDirectory XMLToX12 InputDirectory

OutputFile.X12 FileDescription.XML

or

java XMLToX12 -h

Note: The -D option for the Java virtual machine defines the BBHOME system property. Replace BBHomeDirectory with the directory path on your system for the Babel Blaster Home directory. The utility uses this path to retrieve the EDIControl.xml file.

For C++ on Win32:

XMLToX12 InputDirectory OutputFile.X12 FileDescription.XML

or

XMLToX12 -h

Note: The BBHOME environment variable must be set to the directory path on your system for the Babel Blaster Home directory. The utility uses this path to retrieve the EDIControl.xml file.

As we did in Chapter 5, we're using a system property in Java and an environment variable in C++. Refer back to that chapter for a more detailed discussion of the rationale and how to set environment variables.

Options follow the parameters except for the help option, which may be specified by itself.

Parameters:

  • First: Path specification of the input directory (required). Either a relative or an absolute path name may be specified. The trailing directory separator character is optional.

  • Second: File specification of the output interchange file (required). The specification may include the full or relative path name. If no path name is specified, the interchange file will be created in the current working directory. An extension may be specified, but if not specified the file will be created without one. If a file with the specified name already exists, it will be overwritten.

  • Third: File specification of the file description document (required). If no path name is specified, the file is assumed to reside in the current working directory. The full file name must be specified, but there is no restriction on the extension name.

Options:

  • -v (Validate): Validate the XML documents before processing. The documents are validated against the schema referenced in the document root Element.

  • -h (Help): Display a help message and exit without further processing.

Since a specific file description document file name is passed to the utility, there are no restrictions on how the file is named.

Note: This utility requires that at least the skeleton EDIControl.xml file be present in a directory pointed to by the BBHOME system property in the Java implementation or by the operating system environment variable in the C++ implementation.

Restrictions:

The restrictions are the same as those specified for the X12 to XML utility, plus the following.

  • The segment identifier Element need not be present in the input document. It will be converted if present, but the contents will be overwritten by the segment identifier specified in the grammar.

  • All the XML documents processed must be converted to the same X12 transaction set type. One functional group with all these transaction sets is produced, and only one functional group is written to each interchange.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset