New XML Features in DB2 10 for z/OS !

November 18, 2010

The release of DB2 10 for z/OS was one of the big topics at IBM’s Information on Demand conference in Las Vegas and at the IDUG Europe conference in Vienna a couple of weeks ago. DB2 10 for z/OS is the brand-new version of the DB2 database for mainframe computers running the z/OS operating system.

If you think the mainframe is dead – think again! Mainframe computers are still running many of the world’s most mission-critical databases and applications. Many leading companies in banking, insurance, telecommunications, manufacturing, logistics, and other industries still rely on the mainframe’s unsurpassed reliability and performance for transaction processing. And the wide-spread adoption of XML does not exclude the mainframe world.

DB2 9 for z/OS introduced pureXML with native XML storage, XML indexing, XML Schema support, SQL/XML queries, and XML support in various DB2 utilities such as load, unload, and others. Overall, the XML support in DB2 9 for z/OS is similar to that in DB2 for Linux, UNIX, and Windows (LUW).

The new XML features in DB2 10 for z/OS include:

  • Node-level XML updates: While DB2 9 for z/OS only supported full-document replacement, DB2 10 for z/OS allows you to insert, delete, or modify individual XML elements or attributes within an XML document. This is based on the XQuery Update Facility and is similar to the XML update support in DB2 LUW.
  • Stored procedures and user-defined functions (UDFs) can now have parameters and variables of data type XML. This allows for more flexible and more powerful XML application development.
  • Binary XML for data transmission between database server and client applications. This new binary encoding reduces the size of XML on the wire and the associated network latency. As a result, XML insert and retrieval operations are faster.
  • Concurrency control for XML is now based on a new multi-versioning approach, which allows for higher concurrency and performance. It avoids XML locking for readers. (Note: Multi-versioning does require new function mode.)
  • Increased support for native XML date and time data types.
  • One or multiple XML Schemas can be assigned to an XML column, as a so-called XML column type modifier. As a result, schema validation happens automatically for insert, update, and load operations. This XML column type modifier can be altered and supports schema evolution.
  • XML Schema validation can be offloaded 100% to zIIP and zAAP processors, which reduces CPU cost. This enhancement has also been added to DB2 9 for z/OS (PK90032, PK90040).
  • Enhanced XML index support: XML indexes can now be used to for case-insensitive search (if desired) and to check for the existence or absence of an element or attributes regardless of its value. This has been added to DB2 9 for z/OS too (PK80732, PK80735).
  • Support for XPath functions fn:matches, fn:replace, and fn:tokenize, which allow for powerful string manipulation.

    And there are even more XML enhancements in DB2 10 for z/OS that I haven’t listed above, such as enhancements in utilities like CHECK DATA, LOAD, and UNLOAD. Some of the items on the list above deserve a more detailed discussion and some examples, and I’ll try to get to that in subsequent blog posts. Let me know if you have any specific questions on any of these features.

    About these ads

    4 Responses to “New XML Features in DB2 10 for z/OS !”

    1. Mike Says:

      support for XQuery language (FLWOR)on zOS?

    2. FLWOR expressions are not yet supported in DB2 10 for z/OS. Do you have a specific application on DB2 z/OS where you need FLWOR expressions? If so, feel free to send me an email ( so we can discuss in more detail.

      This also reminds me to make a more general comment: XQuery language constructs, such as FLWOR, add more capabilities and more expressiveness on top of XPath. The same is true for SQL. When you use XPath in SQL functions such as XMLTABLE, XMLQUERY, and XMLEXISTS, you can use additional SQL language constructs on top of those functions to write very advanced SQL/XML queries. Using SQL/XML in UDFs and stored procedures makes it even richer. Hence, quite a few applications can actually implement all or most of their XML processing needs with SQL and XPath.

    3. Rosalie Says:

      Any reason why they have decided not to support FLWOR expressions in DB2 10 for z/OS?

      • Hi Rosalie, I suspect it was a question of how many new features can be put into a new release in a fixed amount of time. There is not just the time to develop but also to thoroughly test and document new features. In the past, a variety of XML enhancements for DB2 z/OS have been delivered as APARs on top of DB2 9 for z/OS. They are all listed in the informational APAR II14426. For example, the powerful XMLTABLE function has been delivered that way. Also, 13 new XPath function were delivered in PK55585 and PK55831. I could imagine that FLWOR expressions might also be delivered as an APAR on top of DB2 10 for z/OS at some point. However, this is just my personal opinion and there is no guarantee until an official announcement from IBM. If and when that hapens, I’ll bog about it : – ) !

        By the way, I think that the new XML features in V10 (including XML updates, XML index enhancements, binary XML transmission, XML in SPs and UDFs, etc.) are all very critical and I personally think it was good to give them priority over FLWOR expressions.


    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s


    Get every new post delivered to your Inbox.

    Join 59 other followers

    %d bloggers like this: