198 Extremely pureXML in DB2 10 for z/OS
DSNU1022I -DB0B 314 21:02:09.86 DSNUILSA - CLAUSE IDENTIFIES 2 OBJECTS
DSNU1021I -DB0B 314 21:02:09.86 DSNUILSA - PROCESSING INCLUDE CLAUSE DATABASE DSN00242.
DSNU1022I -DB0B 314 21:02:09.86 DSNUILSA - CLAUSE IDENTIFIES 2 OBJECTS
DSNU1021I -DB0B 314 21:02:09.86 DSNUILSA - PROCESSING EXCLUDE CLAUSE DATABASE DSN00242.
DSNU1022I -DB0B 314 21:02:09.86 DSNUILSA - CLAUSE IDENTIFIES 1 OBJECTS
DSNU1023I -DB0B 314 21:02:09.86 DSNUILSA - LISTDEF LIST CONTAINS 3 OBJECTS
DSNU1010I 314 21:02:09.86 DSNUGPVV - LISTDEF LIST EXPANDS TO THE FOLLOWING OBJECTS:
LISTDEF LIST -- 00000003 OBJECTS
INCLUDE TABLESPACE DSN00242.BKRTORCS
INCLUDE TABLESPACE DSN00242.XBKR0000
INCLUDE INDEXSPACE DSN00242.IRDOCIDB
9.7 LOAD
Use one of the following methods to load data containing XML columns:
The XML column can be loaded from the input record. The XML column value can be
placed in the input record with or without any other loading column values. The input
record can be in delimited or non-delimited format:
For a non-delimited format, the XML column is treated like a variable character with a
2-byte length preceding the XML value.
For a delimited format there are no length bytes present. If the input record is in
spanned record format, specify the FORMAT SPANNED YES option.
The XML column can be loaded from a separate file whether or not the XML column
length is less than 32 KB.
To load data into a base table that has XML columns, use the following steps:
1. Create input data sets to ensure that you use the appropriate format:
If the data set is in delimited format, ensure that the XML input fields follow the
standard LOAD utility delimited format.
If the data set is not in delimited format, specify the XML input fields similar to the way
that you specify VARCHAR input. Specify the length of the field in a 2-byte binary field
that precedes the data.
2. Create a LOAD utility control statement:
To load XML directly from input record, specify XML as the input field type. XML is the
only acceptable field type and data type conversion is not supported. Do not specify
DEFAULTIF.
If you want the white space to be preserved in the XML data, also specify the keywords
PRESERVE WHITESPACE. By default, LOAD strips the white space.
When data in the binary XML format is loaded into a table, and PRESERVE
WHITESPACE is not specified, DB2 strips white space only when the input data
contains white space tags.
To load XML from a file, specify CHAR or VARCHAR along with either BLOBF, CLOBF
or DBCLOBF to indicate that the input column contains a file name from which a
BLOBF, CLOBF or DBCLOBF is to be loaded to the XML column.
3. Submit the utility control statement.

Get Extremely pureXML in DB2 10 for z/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.