Chapter 8. Overview of DB2 XML Extender 145
The following Technote provides steps for restoring schemas with database files that are used
with XML collections and XML columns:
8.6.6 Troubleshooting and error messages
All the embedded SQL statements and DB2 command line interface (CLI) calls that are made
by XML Extender, as well as those made by your application program, generate codes that
are stored in the job log and indicate whether the embedded SQL or DB2 CLI calls ran
successfully. Your application program can retrieve SQLSTATE and error messages and use
this diagnostic information to isolate and fix problems in your program.
XML Extender also provides return codes to help resolve problems. When you receive a
return code from a stored procedure, check the /QIBM/ProdData/DB2Extenders/XML/
include/dxxrc.h file, which matches the return code with an XML Extender error message
number and the symbolic constant.
All XML Extender error messages are listed in Chapter 13, “Troubleshooting,” in IBM DB2
Universal Database for i5/OS XML Extender Administration and Programming, SC18-9179.
Sometimes the source of a problem is not easily diagnosed. In these cases, try the XML
Extender trace facility. This trace facility records XML Extender activity.
To start the trace from an i5/OS command line, enter:
call QDBXM/QZXMTRC PARM(on user_profiletrace directory’)
Here user_profile is the user profile of the person who is doing the troubleshooting. trace
directory is the name of an existing directory where the trace file will be created.
To end the trace from the i5/OS command line, enter:
call QDBXM/QZXMTRC PARM(off user_profile)
For example, a call to the SVALDIATE UDF returned a 0, which means that validation failed.
The XML Extender trace file shows that a file could not be opened.
The trace file tells us that an exception occurred and that the primary document
/xmlredbook/StoreXML/Store17209.xml could not be opened. See Figure 8-13.
Usually the most useful information in an XML Extender trace file is found at the end of the file
where the error has ended the processing. Because XML Extender continues to append
activity to the bottom of the file as long as trace is on, the trace file can grow quite large and
slow down performance of XML Extender. We recommend that you turn off trace after you
complete the diagnostic activity for a failing scenario.
146 The Ins and Outs of XML and DB2 for i5/OS
Figure 8-13 XML Extender trace file
dxxInit: tmp dir NULL, file thresh 131072
initICU: entered
initICU: db2CodePage = 37
initICU: app code page 37, db code page 37
initICU: got icu converters db conv = 80000000, app conv = 0
dxxInitializeParser: Shared library has been initilized successfully
dxxInitializeParser: Exit, return rc=0
dxxInit: dxxInitializeParser rc = 0, memthresh 131072
dxxSchemaValidateFileExternal:Entered, input
dxxSchemaValidateFileExternal:codepage is 37
dxxSchemaValidate: Entered, doc='/xmlredbook/StoreXML/Store17209.xml'
dxxInitializeParser: Shared library has been initilized successfully
dxxInitializeParser: Exit, return rc=0
dxxSchemaValidate: call dxxInitializeParser(), return rc=0
DXX_getEncoding: Entered.
DXX_getEncoding: Exit, 69 62 6d 30 errCode = 0
dxxSchemaValidate: CodePage found:
dxxGetAbsPath: Exit
dxx_getFileSize: full path =/xmlredbook/StoreXML/StoreSales.dtd rc=0
dxx_getFileSize: size =503
dxxSchemaValidate: setting NoNamespace API for schema file
dxxSchemaValidate: SystemId parse err1: line:0 char:0 An exception occurred!
Type:RuntimeException, Message:The primary document entity could not be opened.
dxxSchemaValidate: DXXQ033E Invalid identifier starting at parse err1: line:0
char:0 An
dxxSchemaValidate: Exit, return rc=0
dxxSchemaValidateFileExternal:Exit, returns 0.
dxxTerminateParser: Exit

Get The Ins and Outs of XML and DB2 for i5/OS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.