Rational Developer for System z, Version 7.6

XML and COBOL type compatibility

In order for your mapping selection to be valid, the COBOL elementary items and XML elements you are trying to match must have similar (compatible) types. In other words, the COBOL data class or category of the mapped item should match the data category of the XML elements. For example, a COBOL numeric item should only be matched with an XML element which could be described by a built-in numeric XML schema type.

Table 1 and Table 2 describe the relationship between COBOL data classes and categories and the XML Schema types. Note that you cannot map COBOL data items that do not have category and class (for example, PROCEDURE POINTER).

Table 1. Mapping of Built-In Primitive XML Types to COBOL Data Classes and Categories
XML Datatype COBOL data Class or Category Default XML to Language Structure Conversion Default Language Structure to XML Conversion (See Note 1)
string Alphabetic, Alphanumeric, National, DBCS, Numeric, Numeric edited (See Note 2) MOVE, NUMVAL MOVE
boolean Alphabetic, Numeric MOVE, NUMVAL MOVE
float Numeric, Numeric-edited MOVE, NUMVAL MOVE
double Numeric, Numeric-edited MOVE, NUMVAL MOVE
decimal Numeric, Numeric-edited MOVE, NUMVAL MOVE
duration Alphanumeric, National N/A N/A
dateTime Alphanumeric, National N/A N/A
time Alphanumeric, National N/A N/A
date Alphanumeric, National N/A N/A
gYearMonth Alphanumeric, National N/A N/A
gYear Alphanumeric, National N/A N/A
gMonthDay Alphanumeric, National N/A N/A
gDay Alphanumeric, National N/A N/A
gMonth Alphanumeric, National N/A N/A
hexBinary Alphanumeric, National N/A N/A
base64Binary Alphanumeric, National N/A N/A
anyURI Alphanumeric, National N/A N/A
QName Alphanumeric, National N/A N/A
NOTATION Alphanumeric, National N/A N/A
Note:
  1. The mapping tools will not enforce matching rules for user-defined simple XML schema types that are derived by constraint. For example, if for a base="int", the user defined type has a constraint of minInclusive value="-99" we may not be able to enforce the minInclusive constraint.
  2. Valid MOVEs between numeric and non-numeric types in XML and COBOL follow the rules described in the COBOL Language Reference Manual.
Table 2. Mapping of Built-In Derived XML Types to COBOL Data Classes and Categories
XML Datatype COBOL data Class or Category Default XML to Language Structure Conversion Default Language Structure to XML Conversion (See Note 1)
normalizedString Alphabetic, Alphanumeric, National N/A N/A
token Alphabetic, Alphanumeric, National N/A N/A
language Alphabetic, Alphanumeric, National N/A N/A
IDREFS Alphabetic, Alphanumeric, National N/A N/A
ENTITIES Alphabetic, Alphanumeric, National N/A N/A
NMTOKEN Alphabetic, Alphanumeric, National N/A N/A
NMTOKENS Alphabetic, Alphanumeric, National N/A N/A
Name Alphabetic, Alphanumeric, National N/A N/A
NCName Alphabetic, Alphanumeric, National N/A N/A
ID Alphabetic, Alphanumeric, National N/A N/A
IDREF Alphabetic, Alphanumeric, National N/A N/A
ENTITY Alphabetic, Alphanumeric, National N/A N/A
integer Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
nonPositiveInteger Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
negativeInteger Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
long Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
int Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
short Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
byte Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
nonNegativeInteger Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
unsignedLong Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
unsignedInt Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
unsignedShort Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
unsignedByte Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
positive-Integer Numeric, Alphanumeric (See Note 2), Numeric-edited MOVE, NUMVAL MOVE
Note:
  1. The mapping tools will not enforce matching rules for user-defined simple XML schema types that are derived by constraint. For example, if for a base="int", the user defined type has a constraint of minInclusive value="-99" we may not be able to enforce the minInclusive constraint.
  2. Valid MOVEs between numeric and non-numeric types in XML and COBOL follow the rules described in the COBOL Language Reference Manual.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)