|
|
Supported Data Types
This section lists the following data types supported by XML Translator.
MFL Data Types
Table A-1 lists the MFL data types that XML Translator supports. These types are specified in the "type" attribute of a FieldFormat element.
Table A-1 Supported MFL Data Types
Data Type |
Description |
---|---|
String |
A string of characters. Requires a length, a length field, a delimiter, or a delimiter field. If no length, length field, or delimiter is defined for a data type String, a delimiter of "\x00" (a NUL character) will be assumed. |
String: NUL terminated |
A string of characters, optionally NUL (\x00) terminated, residing within a fixed length field. This field type requires a length attribute or length field which determines the amount of data read for the field. This data is then examined for a NUL delimiter. If a delimiter is found, data following the delimiter is discarded. If a NUL delimiter does not exist, the fixed length data is used as the value of the field. |
Numeric |
A string of characters containing only digits, i.e. '0' through '9'. Requires a length, length field, delimiter, or a delimiter field. |
Binary (Base64 encoding) |
Any character value accepted. Requires a length, length field, delimiter, or a delimiter field. Resulting XML data for this field is encoded using base-64. |
Binary (Hex encoding) |
Any character value accepted. Requires a length, length field, delimiter, or a delimiter field. Resulting XML data for this field is encoded using base-16. |
EBCDIC |
A string of characters in IBM Extended Binary Coded Decimal Interchange Code. Requires a length, length field, delimiter, or a delimiter field. |
Packed Decimal: Signed |
IBM signed packed format. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Packed Decimal: Unsigned |
IBM unsigned packed format. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Zoned Decimal: Signed |
IBM signed zoned decimal format. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Zoned Decimal: Leading sign |
IBM signed zoned decimal format where the sign indicator is in the first nibble. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Zoned Decimal: Leading separate sign |
IBM signed zoned decimal format where the sign indicator is in the first byte. The first byte only contains the sign indicator and is separated from the numeric value. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Zoned Decimal: Trailing separate sign |
IBM signed zoned decimal format where the sign indicator is in the last byte. The last byte only contains the sign indicator and is separated from the numeric value. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Zoned Decimal: Unsigned |
IBM unsigned zoned decimal format. Requires a length, length field, delimiter, or a delimiter field to be specified. The length or length field should specify the size of this field in bytes. |
Integer: Signed, 1 byte |
A one byte signed integer, i.e. '56' is 0x38. |
Integer: Unsigned, 1 byte |
A one byte unsigned integer, i.e. '128' is 0x80. |
Integer: Signed, 2 byte, Big-Endian |
A signed two-byte integer in big endian format, i.e. '4660' is 0x1234. |
Integer: Signed, 4 byte, Big-Endian |
A signed four-byte integer in big endian format, i.e. '4660' is 0x00001234. |
Integer: Signed, 8 bytes, Big-Endian |
A signed eight-byte integer in big endian format, i.e. '4660' is 0x0000000000001234. |
Integer: Unsigned, 2 byte, Big-Endian |
An unsigned two-byte integer in big endian format, i.e. '65000' is 0xFDE8. |
Integer: Unsigned, 4 byte, Big-Endian |
An unsigned four-byte integer in big endian format, i.e. '65000' is 0x0000FDE8. |
Integer: Unsigned, 8 bytes, Big-Endian |
A unsigned eight-byte integer in big endian format, i.e. '65000' is 0x000000000000FDE8. |
Integer: Signed, 2 bytes, Little-Endian |
A signed two-byte integer in little endian format, i.e. '4660' is 0x3412. |
Integer: Signed, 4 bytes, Little-Endian |
A signed four-byte integer in little endian format, i.e. '4660' is 0x34120000. |
Integer: Signed, 8 bytes, Little-Endian |
A signed eight-byte integer in little endian format, i.e. '4660' is 0x3412000000000000. |
Integer: Unsigned, 2 bytes, Little-Endian |
An unsigned two-byte integer in little endian format, i.e.'65000' is 0xE8FD. |
Integer: Unsigned, 4 bytes, Little-Endian |
An unsigned four-byte integer in little endian format, i.e. '65000' is 0xE8FD0000. |
Integer: Unsigned, 8 bytes, Little-Endian |
A unsigned eight-byte integer in little endian format, i.e. '65000' is 0xE8FD000000000000. |
FloatingPoint: 4 bytes, Big-Endian |
A four byte big endian floating point number that conforms to the IEEE Standard 754. |
FloatingPoint, 4 bytes, Little-Endian |
A four byte little endian floating point number that conforms to the IEEE Standard 754. |
FloatingPoint: 8 bytes, Big-Endian |
A eight byte big endian floating point number that conforms to the IEEE Standard 754. |
FloatingPoint: 8 bytes, Little-Endian |
A eight byte little endian floating point number that conforms to the IEEE Standard 754. |
Date: YYYYMMDD |
An eight byte numeric string of the format YYYYMMDD. A base data of String or EBCDIC may be specified to indicate the character encoding. |
DateTime: YYYYMMDDhhmmss |
A fourteen byte numeric string of the format YYYYMMDDHHMISS. A Base data type may be specified. |
Date: MMDDYY |
A six digit numeric string defining a date, i.e. 012200. |
Date: MMDDYYYY |
An eight digit numeric string defining a date, i.e. 01222000. |
DateTime: MMDDYYhhmm |
A string of numeric digits defining a date and time, i.e. 0122001224. |
DateTime: MMDDYYhhmmss |
A string of numeric digits defining a date and time, i.e. 012200122400. |
Date: MM/DD/YY |
A string defining a date, i.e. 01/22/00. |
Date: MM/DD/YYYY |
A string defining a date, i.e. 01/22/2000. |
DateTime: MM/DD/YY hh:mm |
A string defining a date and time, i.e. 01/22/00 12:24. |
DateTime: MM/DD/YY hh:mi AM |
A string defining a date and time, i.e. 01/22/00 12:24 AM. |
DateTime: MM/DD/YY hh:mm:ss |
A string defining a date and time, i.e. 01/22/00 12:24:00. |
DateTime: MM/DD/YY hh:mm:ss AM |
A string defining a date and time, i.e. 01/22/00 12:24:00 AM. |
Date: DDMMMYY |
A string defining a date, i.e. 22JAN00. |
Date: DDMMMYYYY |
A string defining a date, i.e. 22JAN2000. |
Date: DD/MM/YY |
A string defining a date, i.e. 22/01/00. |
Date: DD/MM/YYYY |
A string defining a date, i.e. 22/01/2000. |
DateTime: DD/MM/YY hh:mm |
A string defining a date and time, i.e. 22/01/00 12:24. |
DateTime: DD/MM/YY hh:mm AM |
A string defining a date and time, i.e. 22/01/00 12:24 AM. |
DateTime: DD/MM/YY hh:mm:ss |
A string defining a date and time, i.e. 22/01/00 12:24:00. |
DateTime: DD/MM/YY hh:mm:ss AM |
A string defining a date and time, i.e. 22/01/00 12:24:00 AM. |
Date: DD-MMM-YY |
A string defining a date, i.e. 22-JAN-00. |
Date: DD-MMM-YYYY |
A string defining a date, i.e. 22-JAN-2000. |
Date: MMM-YY |
A string defining a date, i.e. JAN-00. |
Date: MMM-YYYY |
A string defining a date, i.e. JAN-2000. |
Date: MMMYY |
A string defining a date, i.e. JAN00. |
Date: MMMYYYY |
A string defining a date, i.e. JAN2000. |
Date: MMMDDYYYY |
A string defining a date, i.e. JAN222000. |
Time: hhmmss |
A string defining a time, i.e. 122400. |
Time: hh:mm AM |
A string defining a time, i.e. 12:24 AM. |
Time: hh:mm |
A string defining a time, i.e. 12:24. |
Time: hh:mm:ss AM |
A string defining a time, i.e. 12:24:00 AM. |
Time: hh:mm:ss |
A string defining a time, i.e. 12:24:00. |
Date: Wed Nov 15 10:55:37 CST 2000 |
The default date format of the Java platform, i.e. 'WED NOV 15 10:55:37 CST 2000' |
Literal |
A literal value determined by the contents of the value attribute. When binary data is translated to XML, the presence of the specified literal in the binary data is verified by WLXT. The literal is read, but is not translated to the XML data. When XML data is translated to a binary format, and a literal is defined as part of the binary format, WLXT writes the literal in the resulting binary byte stream. |
Filler |
A sequence of bytes that is not translated to XML. This field of data is skipped over when translating binary data to XML. When translating XML to binary data, this field is written to the binary output stream as a sequence of spaces. |
COBOL Copybook Importer Data Types
Table lists the COBOL data types and the support provided by the Importer.
Table 4-1 COBOL Data Types
COBOL Type |
Support |
---|---|
BLANK WHEN ZERO (zoned) |
supported |
COMP-1, COMP-2 (float) |
supported |
COMP-3, PACKED-DECIMAL |
supported |
COMP, COMP-4, BINARY (integer) |
supported |
COMP, COMP-4, BINARY (fixed) |
supported |
COMP-5, COMP-X |
supported |
DISPLAY (alphanumeric) |
supported |
DISPLAY numeric (zoned) |
supported |
edited alphanumeric |
supported |
edited float numeric |
supported |
edited numeric |
supported |
group record |
supported |
INDEX |
supported |
JUSTIFIED RIGHT |
ignored |
OCCURS (fixed array) |
supported |
OCCURS DEPENDING (variable-length) |
supported |
OCCURS INDEXED BY |
ignored |
OCCURS KEY IS |
ignored |
POINTER |
supported |
PROCEDURE-POINTER |
supported |
REDEFINES |
supported |
SIGN IS LEADING SEPARATE (zoned) |
supported |
SIGN IS TRAILING (zoned) |
supported |
SIGN IS TRAILING SEPARATE (zoned) |
supported |
SIGN IS LEADING (zoned) |
supported |
SYNCHRONIZED |
ignored |
66 RENAMES |
ignored |
66 RENAMES THRU |
ignored |
77 level |
supported |
88 level (condition) |
ignored |
Support for these data types is limited. The following formats:
05 pic 9(5) comp-5
05 pic 9(5) comp-x
will be converted to an unsigned 4 byte integer type, while the following will generate errors:
05 pic X(5) comp-5
05 pic X(5) comp-x
In these samples, pic9(5) could be substituted for pic x(5).
The following values are defined as follows:
Some vendor-specific extensions are not recognized by the importer, however, any copybook statement that conforms to ANSI standard COBOL will be parsed correctly by the Importer. The Importer's default data model, which is based on the IBM mainframe model, can be changed in Format Builder to compensate for character set and data "endianness".
When importing copybooks, the importer may identify fields generically that, upon visual inspection, could easily be identified by a more specific data type. For this reason, the copybook importer creates comments for each field found in the copybook. This information is useful in assisting you in editing the MFL data to better represent the original Copybook. For example:
original copybook entry:
05 birth-date picxx/xx/xx
results in:
A field of type EBCDIC with a length of 8
Closer inspection indicates that this is intended to be a date format and could be defined as
A field of type Date: MM/DD/YY
or
A field of type Data: DD/MM/YY
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|