Defining XML datatype column fields in the Java metadata class
To use IMS Universal JDBC driver support for XML, you need to define the XML datatype column fields for storing and retrieving XML data.
Note: 15 and later supports new DBD
generation parameters for XML datatype definitions: the DATATYPE=XML parameter for the FIELD
statement and the OVERFLOW segment definition for the DFSMARSH statement. If you use these
parameters, the Java™ metadata class will already contain the
XML definitions and you do not need to modify the class. If you are using the IMS catalog database, the metadata is available with a data connection instead
of with a static metadata class.
To define an XML data type column field in the Java metadata class:Procedure
The following example shows how to define XML column datatype fields in a Java metadata class for decomposed mode. In this example, an XML datatype
column field named
HOSPXMLis defined that is associated with the
BMP255-PCB01.xsdXML schema. Another XML datatype column field named
HXMLis defined that is associated with the
B.xsdXML schema.
// The following describes Segment: HOSPITAL ("HOSPITAL") in PCB: PCB01 ("PCB01")
static DLITypeInfo[] PCB01HOSPITALArray= {
new DLITypeInfo("HOSPLL", DLITypeInfo.CHAR, 1, 2, "HOSPLL"),
new DLITypeInfo("HOSPCODE", DLITypeInfo.CHAR, 3, 12,
"HOSPCODE", DLITypeInfo.UNIQUE_KEY),
new DLITypeInfo("HOSPNAME", DLITypeInfo.CHAR, 15, 17, "HOSPNAME"),
new DLITypeInfo("HOSPXML", "BMP255-PCB01.xsd", DLITypeInfo.XML),
new DLITypeInfo("HXML", "B.xsd", DLITypeInfo.XML)
};