Skip to content

Settings

There are several settings that control how TS XML DataServer will manage empty data fields and special characters embedded in data. These can be set in the format definition OOFXMLSV, the XML Sever Global. To access these settings load format OOFXMLSV in Dictionary-IV Format Maintenance then modify the preset (default) setting for the appropriate data-element. From the Dictionary-IV Format Maintenance menu select Format. Scroll down (or F10) to find OOFXMLSV (XML Server Global). Press F1 to edit the format. Edit the “Preset Value” (DEfault) field in the following data elements according to the descriptions below.

XML-EMPTY-ENABLED

Use this data element to control how TS XML DataServer manages empty data fields.

” “ or “N” any empty data fields will not be included in the XML string. This is the default preset value.

“Y” returns empty data fields in the XML string using the data element name as the XML tag. For example, if CUST-NAME was empty the XML string would contain <CUST_NAME></CUST_NAME>.

XML-SPECIAL-CHAR

Use this data element to control how TS XML DataServer manages special characters.

“ “ Does not URL encode special characters.

“U” URL encodes special characters. Special character list is defined as:

Special Character Replaced with Code
- (dash) _ (underscore)
< &lt
> &gt
& &amp
’ &apos
“ &quot

“R” applies the search and replace. This requires that the list of special characters be defined in XML-SPECIAL-SEARCH preset and the replacement values be defined in the XML-SPECIAL-REPLACE preset.

XML-SPECIAL-SEARCH

Use this data element to define the list of special characters that will be searched for and replaced with XML-SPECIAL-REPLACE values.

Enter a Preset Value containing from 1 to 25 characters. Do not use any separators.

See XML-SPECIAL-REPLACE for more information.

XML-SPECIAL-REPLACE

Use this data element to define the list of replacement characters for XML-SPECIAL-SEARCH.

Enter a Preset Value (DE) containing from 1 to 25 characters. Do not use any separators.

For each special character defined in XML-SPECIAL-SEARCH there must be a corresponding replacement character defined in XML-SPECIAL-REPLACE.

Examples of XML-SPECIAL-SEARCH/ XML-SPECIAL-REPLACE

Set the #OOFXMLSV.XML-SPECIAL-CHAR Preset Value to “R” to enable search and replace processing.

  • To replace all instances of the & character with the _ character:

    Set XML-SPECIAL-SEARCH Preset Value to &

    Set XML-SPECIAL-REPLACE Preset Value to _

  • To replace all instances of the & character with the _ character and all instances of = with the x character:

    Set XML-SPECIAL-SEARCH preset value to &=

    Set XML-SPECIAL-REPLACE preset value to _x

  • To replace all instances of the &<>’=“> characters with _ character:

    Set XML-SPECIAL-SEARCH preset value to &<>’=”

    Set XML-SPECIAL-REPLACE preset value to ______ (6 underscore characters)

From the TS XML DataServer Reference, version 8.9.1. Open this page in the PDF