IMS Universal JDBC driver support for XML
You can write applications to store XML data in IMS databases or retrieve XML data from IMS databases by using the IMS Universal JDBC driver. Both the type-4 and type-2 drivers offer this support.
- Retrieve XML data from an IMS database as a character large object (CLOB) through a SQL SELECT statement.
- Store XML data into an IMS database, through a SQL INSERT statement, by using either the PreparedStatement.setClob method or the PreparedStatement.setCharacterStream method.
The syntax for storing and retrieving XML data by using the IMS Universal JDBC driver is independent of how the XML data is physically stored in the IMS database. The interface is not sensitive to whether the data is stored in decomposed storage mode, intact storage mode, or both or whether the data is stored in an existing or new IMS database.
To use IMS Universal JDBC driver support for XML, you need to generate a runtime Java™ metadata class that corresponds to a program specification block (PSB). The Java metadata class must define the column fields in the IMS database for storing and retrieving XML data and identify the XML schema that describes the structure of the data.
IMS Version 12 and later includes new DBD source parameters (the DATATYPE=XML parameter of the FIELD statement and the OVERFLOW parameter of the DFSMARSH statement) that you can use to define XML-containing fields and overflow segments. If your IMS system uses the IMS catalog database, the IMS Enterprise Suite Explorer for Development can make a connection to the catalog to dynamically retrieve the needed metadata instead of generating a static metadata class. If your IMS system does not use the IMS catalog database, these field definitions are included in the static Java metadata class created with the IMS Explorer for Development.