PL/I to XML schema mapping
The DFHLS2SC and DFHLS2WS utility programs support mappings between PL/I data structures and XML schema definitions. Because the Enterprise PL/I compiler and older PL/I compilers differ, two language options are supported: PLI-ENTERPRISE and PLI-OTHER.
- Characters that are not valid in XML element names are replaced
with '
x
'.
For example, monthly$total becomes monthlyxtotal.
- Duplicate names are made unique by the addition of one or more
numeric digits.
For example, two instances of year become year and year1.
- Data items with the COMPLEX attribute are not supported.
- Data items with the FLOAT attribute are supported at a mapping level of 1.2 or higher. Enterprise PL/I FLOAT IEEE is not supported.
- VARYING and VARYINGZ pure DBCS strings are supported at a mapping level of 1.2 or higher.
- Data items that are specified as DECIMAL( p , q ) are supported only when p ≥ q
- Data items that are specified as BINARY( p , q ) are supported only when q = 0.
- If the PRECISION attribute is specified for a data item, it is ignored.
- PICTURE strings are not supported.
- ORDINAL data items are treated as FIXED BINARY(7) data types.
- If the MAPPING-LEVEL parameter is set to 1.2 or higher and the CHAR-VARYING parameter is set to NULL, character arrays are mapped to an xsd:string and are processed as null-terminated strings; this mapping does not apply for Enterprise PL/I.
- If the MAPPING-LEVEL parameter is set to 1.2 or higher and the CHAR-VARYING parameter is set to BINARY, character arrays are mapped to xsd:base64Binary and are processed as binary data.
- If the MAPPING-LEVEL parameter is set to 1.2 or higher and the CHAR-VARYING parameter is set to COLLAPSE, <xsd:whiteSpace value="collapse"/> is generated for strings.
3 FIELD1 FIXED BINARY(7),
3 FIELD2 FIXED BINARY(31),
3 FIELD3 FIXED BINARY(63);
In this example:
- FIELD1 is 1 byte long and can be aligned on any boundary.
- FIELD2 is 4 bytes long and must be aligned on a fullword boundary.
- FIELD3 is 8 bytes long and must be aligned on a doubleword boundary.
- FIELD3 is aligned first because it has the strongest boundary requirements.
- FIELD2 is aligned at the fullword boundary immediately before FIELD3.
- FIELD1 is aligned at the byte boundary immediately before FIELD3.
3 PAD1 FIXED BINARY(7),
3 PAD2 FIXED BINARY(7),
3 PAD3 FIXED BINARY(7),
3 FIELD1 FIXED BINARY(7),
3 FIELD2 FIXED BINARY(31),
3 FIELD3 FIXED BINARY(63);
Alternatively, you can change
the structure to declare all the fields as unaligned and recompile
the application that uses the structure. For more information about
PL/I structural memory alignment requirements, refer to
Enterprise
PL/I Language Reference.
| PL/I data description | Schema |
|---|---|
| FIXED BINARY (n) where n ≤ 7 |
|
| FIXED BINARY (n) where 8 ≤ n ≤ 15 |
|
| FIXED BINARY (n) where 16 ≤ n ≤ 31 |
|
| FIXED BINARY (n) where 32 ≤ n ≤ 63 Restriction: Enterprise PL/I only
|
|
| UNSIGNED FIXED BINARY(n)
where n ≤ 8 Restriction: Enterprise PL/I only
|
|
| UNSIGNED FIXED BINARY(n) where 9 ≤ n ≤ 16 Restriction: Enterprise PL/I only
|
|
| UNSIGNED FIXED BINARY(n) where 17 ≤ n ≤ 32 Restriction: Enterprise PL/I only
|
|
| UNSIGNED FIXED BINARY(n) where 33 ≤ n ≤ 64 Restriction: Enterprise PL/I only
|
|
| FIXED DECIMAL( n , m ) |
|
| FIXED DECIMAL(15)
Supported at mapping level 3.0 and higher when DATETIME=PACKED15 |
The format of the time stamp is
CICS®
ABSTIME.
|
| BIT(n) where n is a multiple of 8. Other values are not supported. |
where
m
=
n
/8
|
| CHARACTER( n )
VARYING and VARYINGZ are also supported at mapping level 1.2 and higher. Restriction: VARYINGZ is supported only by Enterprise PL/I
|
|
| GRAPHIC(
n
)
VARYING and VARYINGZ are also supported at mapping level 1.2 and higher. Restriction: VARYINGZ
is supported only by
Enterprise PL/I
|
At a mapping level of 1.0 and 1.1, where
m
=
2*
n
:
At a mapping level of 1.2 or higher:
|
| WIDECHAR(
n
)
Restriction: Enterprise PL/I only
|
At a mapping level of 1.0 and 1.1, where
m
=
2*
n
:
At a mapping level of 1.2 or higher:
At mapping level 4.0 and higher, CICS populates the application data structure field with UTF-16 data.
|
| ORDINAL
Restriction: Enterprise
PL/I only
|
|
| BINARY FLOAT( n )
where n <= 21 Supported at mapping level 1.2 and higher. |
|
| BINARY FLOAT( n ) where 21 < n <= 53 Values greater than 53 are not supported. Supported at mapping level 1.2 and higher. |
|
| DECIMAL FLOAT( n )
where n <= 6 Supported at mapping level 1.2 and higher. Note: The IBM® Hexadecimal Floating Point (HFP)
data representation is not exactly the same as the IEEE-754-1985 representation that is used for
XML. Some values might not convert exactly from one representation to the other. Some extremely
large or small values might not be valid for xsd:float data types. Some values
might lose precision when converted to or from HFP representation. If precise conversions are
important, consider replacing use of DECIMAL FLOAT data types with fixed precision alternatives.
|
|
| DECIMAL FLOAT( n ) where 6 < n
<= 16
Values greater than 16 are not supported. Supported at mapping level 1.2 and higher. Note: The IBM Hexadecimal Floating Point
(HFP) data representation is not exactly the same as the IEEE-754-1985 representation that is used
for XML. Some values might not convert exactly from one representation to the other. Some extremely
large or small values might not be valid for xsd:double data types. Some values
might lose precision when converted to or from HFP representation. If precise conversions are
important, consider replacing use of DECIMAL FLOAT data types with fixed precision alternatives.
|
|