LOADing pdf-files into DB2 for z/OS (V8)

Lennart Henang

LOADing pdf-files into DB2 for z/OS (V8)
Hi folks!

We are starting to look into the possibility to use LOAD to populate a table
with about 1.5 million pdf documents. When reading the Utility Guide and
Reference manual (SC18-7427-04) for DB2 for z/OS V8, the option to use is
VARCHAR BLOBF to point to the files (file reference variables). However, the
manual states that there always has to be a fullword with the length of the
BLOB first. It says "You must specify the length in bytes in a 4-byte binary
field that precedes the data. (The length does not include the 4-byte field
itself.)"

It is not really clear that this statement is valid also for BLOBs in files. We can
understand that it's needed within a SYSREC input file, but it is a little bit
strange if you need to manipulate the pdf files to prepend a length field to the
pdf data.

We also looked into the newest redbook on BLOBs (SG24-7270), but we could
get any more information out of it regarding this.

Anyone that tested to use file reference variables to LOAD LOBs into a table?
And, is there really a need to prepend the LOB data with its length?

Thanks in advance, Len...

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Ken Ziervogel

Re: LOADing pdf-files into DB2 for z/OS (V8)
(in response to Lennart Henang)
When you define your file variable as VARCHAR BLOBF, the field you
defined in your input record is treated as a regular VARCHAR (2 byte
length followed by the data) that contains the file name of the BLOB.

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Lennart Henang
Sent: Monday, December 03, 2007 8:41 AM
To: [login to unmask email]
Subject: [DB2-L] LOADing pdf-files into DB2 for z/OS (V8)

Hi folks!

We are starting to look into the possibility to use LOAD to populate a
table
with about 1.5 million pdf documents. When reading the Utility Guide and

Reference manual (SC18-7427-04) for DB2 for z/OS V8, the option to use
is
VARCHAR BLOBF to point to the files (file reference variables). However,
the
manual states that there always has to be a fullword with the length of
the
BLOB first. It says "You must specify the length in bytes in a 4-byte
binary
field that precedes the data. (The length does not include the 4-byte
field
itself.)"

It is not really clear that this statement is valid also for BLOBs in
files. We can
understand that it's needed within a SYSREC input file, but it is a
little bit
strange if you need to manipulate the pdf files to prepend a length
field to the
pdf data.

We also looked into the newest redbook on BLOBs (SG24-7270), but we
could
get any more information out of it regarding this.

Anyone that tested to use file reference variables to LOAD LOBs into a
table?
And, is there really a need to prepend the LOB data with its length?

Thanks in advance, Len...

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion
listserv that are being implemented to improve reliability and the
overall user experience of DB2-L. These changes are coming on November
30th. Details at http://www.idug.org

------------------------------------------------------------------------
---------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that
page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm

IMPORTANT NOTICE:

IDUG is pleased to announce a series of upgrades to the DB2-L discussion listserv that are being implemented to improve reliability and the overall user experience of DB2-L. These changes are coming on November 30th. Details at http://www.idug.org

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm