Data Type Properties (by data type)

This section describes the properties that are specific to a given data type.

Common Properties

All data types support these properties:

Property
Description
Affects XML
Lookup List
This property lets you build a substitution table for output. It includes a two-column table. At runtime, any item which evaluates to a value in the left column is replaced by the corresponding value in the right column in the output stream. A blank value on the left can be used to set a default value for the field. Note that this is applied before the test to determine if the data should be qualify for Omit from Output.
Yes
Notes
Allows you to add internal comments for a field. It is not used by custom XML conversion definitions.
No
Omit from Output
Allows a field to be omitted from XML output based on its presence or value. Valid values include:
l Only When Empty. This is the default.
l When Empty or Zero. Does not emit an element containing the value if it evaluates numerically to zero.
l Always. Always hides the field from the output.
l Never. Always includes the field in the output
Yes
XML Output Form
Determines whether the value is emitted into the output stream as an element or as an attribute. The default is element.
Yes
Table 31. Common Properties

BCD Datatype Properties

Binary Coded Decimal (BCD) is a set of ways to pack one or two decimal digits into each byte. These are various related types of machine-specific encodings for numbers. The Comp3 and Zoned types are different implementations of this idea.

Binary Datatype Properties

Binary data in raw form.

Boolean Datatype Properties

True/false values, with support for three-valued-logic (true/false/unknown or null). The following steps are taken to determine the value of a boolean field:

1. If the field contains all binary zeros, it is false.
2. If the field contains all binary ones (that is, all 0xFF values), it is true.
3. If the field is one byte long and contains a 0x01 value, it is true.
4. If the first or last byte in the field contains a 0x01 and all of the other bytes are 0x00, it is true.
5. If the contents of the field match any of the items in the True Value Match List or False Value Match List, then the value is true or false respectively.
6. If none of these rules apply, the value is considered unknown.

Property
Description
Editable
Affects XML
True Value Match List
A semicolon (";") -separated list of values. If the input value matches any of them in step 5, it is considered true and the value from the True Output As property is emitted. The default list is:
l y
l t
l yes
l true
l .y.
l .t.
The comparisons are not case-sensitive.
Yes
Yes
False Value Match List
A semicolon (";") -separated list of values. If the input value matches any of them in step 5, it is considered false and the value from the False Output As property is emitted. The default list is:
l n
l f
l no
l false
l .n.
l .f.
The comparisons are not case-sensitive.
Yes
Yes
True Output As
If the value is determined to be true then this value is output. The default is "Yes".
Yes
Yes
False Output As
If the value is determined to be false then this value is output. The default is "No".
Yes
Yes
Unknown Output As
If the value cannot be determined as true or false, then this value is output. The default is "?".
Yes
Yes
Left Padding, Right Padding
These two properties control what sort of padding is to be found on either side of the field and then removed. Any characters listed here will be removed. Characters can be specified either by their Unicode values, their Unicode names, or single-quoted.
The default for both is spaces (0x20) and tabs (0x09).
If there are field delimiters, these are the characters that are trimmed from the contents within the delimiters. The region-level Characters to Toss setting determines which characters are trimmed outside of the delimiters. If there are no delimiters, then the Characters to Toss setting is applied first, and then Left Padding and Right Padding are applied.
Yes
Yes
Table 34. Boolean Properties

Byte Datatype Properties

A single byte with a range of 0 to 255 for unsigned or -128 to 127 for signed.

Comp3 Datatype Properties

Also known as "Computational-3," "Packed" or "Packed Decimal." A COBOL storage format similar to Zoned below but differing in internal structure. It is also related to the BCD types.

Date Datatype Properties

A date, stored either as a string or in binary form.

The parsing rules are:

1. If the length is 3, then the day, month and year are read as binary values in the Date Format order. The Window for Two-digit Years value is used to determine the century. If the format is YJ, then the first byte is the year, and the second two are the day number in the year, stored as LSB, MSB.
2. If the length is 6, then the same is used, except each day/month/year is taken as two digits.
3. If the length is 8 and there are no separators, then the day and month each get two digits and the year gets four.
4. Otherwise, it is parsed using the YMD Separator characters.
5. For months, the names or abbreviations in English, German, Spanish, French, Portuguese and Italian are recognized.

Property
Description
Editable
Affects XML
Date Format
The default is read from the local system settings at the time the custom XML converter is defined.
l DMY (day-month-year)
l MDY (month-day-year)
l YMD (year-month-day)
l YJ (year-daynumber a.k.a. "Julian" format)
Yes
Yes
YMD Separator
A hint to the parser as to the most likely separator between the date components that will be seen.
The default value comes from the local system configuration, and also includes the period ("."), comma (","), hyphen ("-"), slash ("/") and space.
Yes
Yes
Window for Two-digit Years
If the year is only given as two digit, this is the cut-off date for determining the century. The default is 1950.
Yes
Yes
Left Padding, Right Padding
These two properties control what sort of padding is to be found on either side of the field and then removed. Any characters listed here will be removed. Characters can be specified either by their Unicode values, their Unicode names, or single-quoted.
The default for both is spaces (0x20) and tabs (0x09).
If there are field delimiters, these are the characters that are trimmed from the contents within the delimiters. The region-level Characters to Toss setting determines which characters are trimmed outside of the delimiters. If there are no delimiters, then the Characters to Toss setting is applied first, and then Left Padding and Right Padding are applied.
Yes
Yes
Table 37. Date Properties

DateTime Datatype Properties

A date plus a time.

This is parsed as a date followed by the Date-Time Separator followed by a time. It combines the properties of both, and includes that one additional property.

Decimal Datatype Properties

Reads 16 bytes and interprets it as a .net System.Decimal. Numbers as large as 1028 (positive or negative) and with as many as 28 significant digits can be stored as a decimal type without loss of precision.

Double Datatype Properties

The standard IEEE 8-byte floating point format.

Float Datatype Properties

The standard IEEE 4-byte floating point format.

Integer Datatype Properties

A four-byte integer with a range of 0 to 4,294,967,295 for unsigned or -2,147,483,648 to 2,147,483,647 for signed.

Property
Description
Editable
Affects XML
Signed
l true (default)
l false - use this to make the value unsigned
Yes
Yes
Scaling Factor (10^n)
This is a value from -16 (shifts the decimal 16 places to the right, making the number smaller by n orders of magnitude) to 0 (keeps the number exactly as it appears in the input) to 16 (shifts the decimal 16 places to the left, making the number larger by n orders of magnitude). To enter a scaling factors from 10-16 to 1016, just enter the exponent value.
Example: Entering an exponent of 3 will cause any numbers to be multiplied by 1000 (103) before being output to XML.
Yes
Yes
Endian
When binary numbers are stored, they can be stored with the smallest component first (little-endian) or last (big-endian).
l Little - the standard for Intel x86-based machines (default)
l Big
Yes
Yes
Table 41. Integer Properties

Long Datatype Properties

An eight-byte integer with a range of 0 to 18,446,744,073,709,551,615 for unsigned or -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 for signed.

Property
Description
Editable
Affects XML
Signed
l true (default)
l false - use this to make the value unsigned
Yes
Yes
Scaling Factor (10^n)
A value from -16 (shifts the decimal 16 places to the right, making the number smaller by n orders of magnitude) to 0 (keeps the number exactly as it appears in the input) to 16 (shifts the decimal 16 places to the left, making the number larger by n orders of magnitude). To enter a scaling factors from 10-16 to 1016, just enter the exponent value.
Example: Entering an exponent of 3 will cause any numbers to be multiplied by 1000 (103) before being output to XML.
Yes
Yes
Endian
When binary numbers are stored, they can be stored with the smallest component first (little-endian) or last (big-endian).
l Little - the standard for Intel x86-based machines (default)
l Big
Yes
Yes
Table 42. Long Properties

Number Datatype Properties

This corresponds to numbers stored in text form.

Note that if the number is followed by a percent ("%") it is divided by 100; if followed by a permille ("") it is divided by 1000.

A leading or trailing '+' is ignored, as numbers are assumed positive. A leading or trailing '-' will make the number negative.

Property
Description
Editable
Affects XML
Decimal
The character that corresponds to the decimal point. It is typically a period (".") or comma (","). The default value is determined by the settings on the machine creating the custom XML converter.
Yes
Yes
Thousands
The character that corresponds to the thousands separator. The default is fetched from the system settings, and is typically a comma (","), period (".") or space, and is subsequently stored with the custom XML converter. If seen in the input, it is thrown away and not preserved in the output.
Yes
Yes
Base
The numeric base in which the number is stored in the input file. It can be anything from 2 (binary) to base 36. The default is 10 (decimal). Other common numbers are 8 (octal) and 16 (hexadecimal).
Yes
Yes
Scaling Factor (10^n)
A value from -16 (shifts the decimal 16 places to the right, making the number smaller by n orders of magnitude) to 0 (keeps the number exactly as it appears in the input) to 16 (shifts the decimal 16 places to the left, making the number larger by n orders of magnitude). To enter a scaling factors from 10-16 to 1016, just enter the exponent value.
Example: Entering an exponent of 3 will cause any numbers to be multiplied by 1000 (103) before being output to XML.
Yes
Yes
'C' Rules for Octal and Hex
l yes - if a number begins with 0 it is considered octal, or if it begins with 0x it is considered hexadecimal; otherwise it is considered decimal (default)
l no - numbers are considered in the given Base only
Yes
Yes
Use Currency Conventions
l yes - if the number is surrounded by '(' and ')' or has a trailing 'cr' (case-insensitive) it is considered negative, or if it has a trailing 'db' or 'dr' (also case-insensitive) it is considered positive (default)
l no
Yes
Yes
Left Padding, Right Padding
These two properties control what sort of padding is to be found on either side of the field and then removed. Any characters listed here will be removed. Characters can be specified either by their Unicode values, their Unicode names, or single-quoted.
The default for both is spaces (0x20) and tabs (0x09).
If there are field delimiters, these are the characters that are trimmed from the contents within the delimiters. The region-level Characters to Toss setting determines which characters are trimmed outside of the delimiters. If there are no delimiters, then the Characters to Toss setting is applied first, and then Left Padding and Right Padding are applied.
Yes
Yes
Table 43. Number Properties

Short Datatype Properties

A two-byte integer with a range of 0 to 65,535 for unsigned or -32,768 to 32,767 for signed.

Property
Description
Editable
Affects XML
Signed
l true (default)
l false - use this to make the value unsigned
Yes
Yes
Scaling Factor (10^n)
A value from -16 (shifts the decimal 16 places to the right, making the number smaller by n orders of magnitude) to 0 (keeps the number exactly as it appears in the input) to 16 (shifts the decimal 16 places to the left, making the number larger by n orders of magnitude). To enter a scaling factors from 10-16 to 1016, just enter the exponent value.
Example: Entering an exponent of 3 will cause any numbers to be multiplied by 1000 (103) before being output to XML.
Yes
Yes
Endian
When binary numbers are stored, they can be stored with the smallest component first (little-endian) or last (big-endian).
l Little - the standard for Intel x86-based machines (default)
l Big
Yes
Yes
Table 44. Short Properties

String Datatype Properties

A regular string of characters.

Property
Description
Editable
Affects XML
Normalize White Space
l yes - change all linefeeds, carriage returns and tabs into spaces, then remove all spaces from start and end of text, then collapse any consecutive spaces into a single space (default)
l no (leave all whitespace alone)
Yes
Yes
Left Padding, Right Padding
These two properties control what sort of padding is to be found on either side of the field and then removed. Any characters listed here will be removed. Characters can be specified either by their Unicode values, their Unicode names, or single-quoted.
The default for both is spaces (0x20) and tabs (0x09).
If there are field delimiters, these are the characters that are trimmed from the contents within the delimiters. The region-level Characters to Toss setting determines which characters are trimmed outside of the delimiters. If there are no delimiters, then the Characters to Toss setting is applied first, and then Left Padding and Right Padding are applied.
Yes
Yes
Table 45. String Properties

Time Datatype Properties

A time value.

The parsing rules are as follows:

1. If the first character is an 'n' or 'N', it is assumed to be noon (12:00:00).
2. If the first character is an 'm' or 'M', it is assumed to be midnight (00:00:00).
3. If there is a HMS separator, the next three steps are skipped.
4. If the length is six or more, then the hours are the first two characters, the minutes are the next two characters, and the seconds are the next two digits.
5. If the length is four or five, then the hours are the first two characters, and the minutes are the next two characters.
6. No valid date can be determined.
7. If an HMS separator was seen, then the following rules are tried:
8. Up to two digits become the hour, terminated by the HMS separator.
9. Up to two more digits become the minute, also terminated by the HMS separator.
10. If there are any more digits, the next two become the seconds value.
11. If there is a decimal character and more digits, they become fractional parts of the seconds.
12. If an 'am' or 'pm' (case-insensitive) marker is found, the hours are adjusted accordingly.
13. Wrapping is performed for seconds >= 60 and minutes >= 60. Hours are moduloed with 24.

Property
Description
Editable
Affects XML
HMS Separator
This is a hint to the parser as to the most likely separator between the hours, minutes and seconds that will be seen.
The default value comes from the local system configuration, and also includes the colon (":"), period (".") and space.
Yes
Yes
Left Padding, Right Padding
These two properties control what sort of padding is to be found on either side of the field and then removed. Any characters listed here will be removed. Characters can be specified either by their Unicode values, their Unicode names, or single-quoted.
The default for both is spaces (0x20) and tabs (0x09).
If there are field delimiters, these are the characters that are trimmed from the contents within the delimiters. The region-level Characters to Toss setting determines which characters are trimmed outside of the delimiters. If there are no delimiters, then the Characters to Toss setting is applied first, and then Left Padding and Right Padding are applied.
Yes
Yes
Table 46. Time Properties

Zoned Datatype Properties

Also known as the "IBM Signed" format. It is related to Comp3.

 
Free Stylus Studio XML Training:
W3C Member