Setting up stage properties (DataStage)

The Stage properties are defined on four pages:

  • Document Settings
  • Transformation Settings
  • Validation Settings
  • Options
    Note: When there is one output link, use the Output link page to modify the properties for Document Settings, Transformation Settings, and Options. Use the Stage page to modify properties in Validation Settings.

Document settings page (DataStage)

This page includes up to five tabs, which control the inclusion of following items in the output:

  • Comment
  • Header
  • Namespace declaration
  • Document type
  • Nested chunk

Generating XML fragments

To indicate that the generated XML includes only XML fragments, select the Generate XML Chunk box.

The number of tabs depends on whether the Generate XML Chunk box is selected. If not selected, all five Document Settings tabs are present. If selected, the tabs include only Comment, Namespace Declaration and Nested Chunk.

Comment tab

Use this tab to toggle the inclusion of the following XML comment in the generated XML. The comment is inserted after the XML declaration.


<!--
- Generated by IBM Corporation, DataStage - XMLOutput stage - 
- Date
-->

Header tab

Use this tab to insert processing instructions, comments, and other information between the XML declaration and the root element in the generated XML.

You can access a header from DataStage®. In addition, you can type tags in the text box.

Namespace Declaration tab

Use this tab to insert a space-delimited list of namespace declarations within the generated root element tag.

The syntax is: xmlns:<prefix>="<namespace_url>"

You can load namespace declarations from only table definitions that XML Meta Data Importer generates. If you did not use XML Meta Data Importer, type the declarations in the text box.

To load namespace declarations:

  1. Click the Include box.
  2. Click the Load button. The Table Definitions dialog box opens.
  3. Locate the table definition containing the namespace declarations and click OK. The namespace declarations appear in the text box.

Document type tab

Use this tab to insert a document type declaration in the generated XML.

You can access a document type declaration from DataStage. In addition, you can type the declaration in the text box.

Nested Chunk tab

Use this tab to insert a nested chunk in the generated XML.

You can access a nested chunk from DataStage or from a web site. In addition, you can type the nested chunk in the text box.

Transformation settings page (DataStage)

Use this page to:

  • Replace NULLs with empty values.
  • Replace empty values with NULLs.
  • Select an empty tag style:
    • <tag></tag>
    • <tag/>
  • Select a mode for generating output rows:
    • Generate one XML document for all rows (Aggregate all rows mode).
    • Generate one XML document per input row (Single row mode).
    • Trigger a new output row when the value of an input column changes (Use trigger column mode).

Validation settings page (DataStage)

These properties control:

  • Validating the output XML against the XML schema referenced in the XML document.
  • Setting the schema validation level.
  • Caching a schema grammar for another XML document that uses the same schema.
  • Logging rejection errors for an output row into the job log.
  • Mapping transformation error messages to DataStage error levels. These include fatal, error (non-fatal), and warning messages.

Options page (DataStage)

Use this page to control processing of the following items:

  • Output file. Determines whether an output file is written, and provides the file path.

    For more information about output files, see Writing output to your file system.

  • Indentation character. Character to use for indenting nested elements.
  • New line style. Choose a new line character from among operating system defaults.
  • Output encoding for NLS installations. For non-NLS installations, UTF-8 is used. NLS installation, select the encoding from the XML output encoding list. The default encoding is UTF-8.