96 LOBs with DB2 for z/OS: Stronger and Faster
Explanations of Example 4-11 on page 95 are:
򐂰 filename: Contains the name of the IXF input file that contains the data to be loaded (data
of the base table columns and the names of the LOB files). If the path is omitted, the
current working directory is used.
򐂰 IXF: File format of the input file supported by DB2 on the host (IXF is integrated exchange
format, in which most of the table attributes are saved).
򐂰 lobpath: Specifies the path where the LOB files are stored. The names of the LOB data
files are stored in the main input file in the column that is loaded into the LOB column.
򐂰 into: Specifies the host table or host view to be loaded.
The best way to create a working base for the IMPORT command is to first EXPORT a similar
table from the host to the workstation using an EXPORT command as shown in
Example 4-12. Similarly, you first have to CONNECT to the host DB2 system.
Example 4-12 EXPORT command
export to filename of ixf lobs to lobpath lobfile lobfile modified by
lobsinsepfiles select * from X.MYTABLE
The explanations for Example 4-12 are:
򐂰 filename: Contains the name of the IXF file to which data is to be exported. If the
complete path to the file is not specified, the export utility uses the current directory and
the default drive as the destination.
򐂰 lobpath: Specifies a path to a directory in which the LOB files are to be stored.
򐂰 lobfile: Contains the base file name for the LOB files. When creating LOB files during an
export operation, file names are constructed by appending the current base name from
this list to the current path from lobpath and then appending a 3-digit sequence number.
For example, if the current LOB path is the directory c:\u\davy\lobpath, the LOB files
created are c:\u\davy\lobpath\lobfile.001.lob, c:\u\davy\lobpath\lobfile.002.lob, and so
򐂰 lobsinsepfiles: Required parameter to specify that the LOBs are stored in separate files on
the lobpath.
򐂰 From: Specifies a host table or host view containing the columns to unload from the host.
Afterwards, you can create a similar IXF file on the workstation and edit it with the names of
the LOB files you want to upload.
See the DB2 for Linux, UNIX and Windows manuals for complete information about the
IMPORT and EXPORT commands.
4.5 Locking
Locking for LOBs has significantly changed in DB2 9; therefore, the information about LOB’s
locking techniques with DB2 V8 and DB2 9 are mentioned in two separate sections.
For LOB locking with DB2 V8, see 4.5.1, “Locking for LOBs with DB2 V8” on page 97. Locking
for LOBs beginning with DB2 9 is described at 4.5.2, “Locking for LOBs with DB2 9” on
page 103. Note that the different locking mechanisms introduced in DB2 9 were not retrofitted
to DB2 V8.
Tip: Be sure that the input file does not contain values for the ROWID column. These are
rejected by DB2 on the host when the ROWID column was defined there as GENERATED

Get LOBs with DB2 for z/OS: Stronger and Faster 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.