IBM Systems Magazine, Mainframe Edition - November/December 2010 - (Page 44)

Developer System z application development Storing, Processing and Parsing XML 5H[P]LÃ?43ÃZ\WWVY[à Z[YLUN[OLUZÃ+)%ÃHUKà *6)63ÃKL]LSVWTLU[ By Troy Coleman : toring and processing XML documents in DB2* using the native XML data type may greatly improve access performance. In the past, people didn’t store XML in DB2 because it was very slow to store the data and even slower when reading documents. The new capability to store and index, added in DB2 9, negates that argument. Another powerful feature in DB2 9 is important to validate the XML document during the development stage of the application. DB2 9 for z/OS* provides XML validation management through the XML schema repository (XSR). Once you define the XML schema def i n it ion ( X SD ) w it h t he X M L validation rules, you can register it to the DB2 XML Schema Repository (XSR). Then it can be used during INSERT and UPDATE processing to validate the XML document. The XML schema registration can be handled manually through one of these methods: the capability to return XML documents Editor’s Note: This is the final installment of a continuing series on XML, DB2 and COBOL development on the z/OS platform. Previously published articles are available online. in a relational table. This feature allows you to combine and process your legacy relational data along with your XML data in the same SQL statement, which takes advantage of the DB2 optimizer and greatly reduces the complexity in program code. hÁ“Process XML Documents Within COBOL and DB2” mainframe/septemberoctober09/ administrator/26607p1.aspx =HSPKH[PUNÃ?43ÃVUÃ05:,9; The strength of XML is its capability to quickly have a document adapt to new business requirements. This strength can also be seen as a weakness due to the lack of necessary controls to ensure the data elements and data types are enforced as they are with relational data. The data quality of the XML document can become a problem during development if you don’t validate the contents. You may find you’ve mistyped the element name or put character data in a numeric field. It’s hÁ“COBOL and XML Parsers” mainframe/processing_XML_ documents/32657p1.aspx hÁ“Storing and Processing XML in DB2” mainframe/DB2_XML_ purescale/34039printp1.aspx hÁ Call the following DB2 stored procedures: Sysproc.xsr_reg ister, sysproc.xsr_addschemadoc, sysproc. xsr_complete h Á I nvoke t he fol low i ng J DBC met hod t hat per for ms all of t he stored-procedure steps : Com. 44 NOVEMBER/DECEMBER 2010

Table of Contents for the Digital Edition of IBM Systems Magazine, Mainframe Edition - November/December 2010

IBM Systems Magazine, Mainframe Edition - November/December 2010
On the Web
Editor's Desk: Tradition Takes Planning
Dashboard: Walk While You Work
Data Display: All About Spam
Think Smarter: IBM Offers Smarter Systems for Performance and Scalability
Trends: Rosamilia Oversees Both System z and Power Systems Lines as New GM
Break Through Economics: Dr. Howard Rubin Discusses Mainframe Efficiencies and the zEnterprise System
Streamlining Development: IBM Rational on zEnterprise System Utilizes Multiplatform Development Capabilities
Administrator: The zEnterprise System Changes Firewall Requirements
Technical Corner: z/OS Predictive Failure Analysis Make It Easy to Spot and Fix Soft System Failures
Developer: Native XML Support Strengthens DB2 and COBOL Development
Advertisers' Index
Stop Run: Former IBMer Jim Bell Finds Inspiration in Music

IBM Systems Magazine, Mainframe Edition - November/December 2010