Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / December 2004

Tip: Looking for answers? Try searching our database.

Archiving blobs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin - 14 Dec 2004 16:59 GMT
Hello -

Quick question - does anyone know of a good way to archive a blob?

Some background - Our application (Java Web Application) uses a DB2
table with a blob column of length 75000 to store some data.  The data
in this table needs to be in the system for approximately 60 days and
then we want to archive the data "somewhere else" for legal purposes.
We have put together a archive process using some Cobol programs on the
mainframe to retrieve the data from the tables and write them out to
files that will then be shipped off to tape.

However, we have run into a slight problem with the blob table.
Through our Cobol program, the largest variable can be essentially 32K
in length.  As such, our 75000 byte field doesn't fit into a variable.
We could put together some code to read the data out in multiple parts,
and then some how get it into files but the process of getting the data
back in (if necessary for legal review) is complicated.

I'm looking for ideas, or ideas for a solution to pulling this data out
in such a way that it would be easy to shove it back in again if
necessary.  Any ideas are welcome - our environment consists of Java,
Cobol Programs, DB2 Stored procedures, and UNIX shell scripts on
Solaris and AIX.

If anyone has any ideas or has done this before - I would appreciate
some feedback.

Thanks in advance for your help!

Kevin
Mark Yudkin - 28 Dec 2004 07:19 GMT
Typically, blobs are internally structured to match the data - if so, just
map the structure to a COBOL structure.
Otherwise use an OCCURS DEPENDING ON byte array in Cobol to overcome the 32K
string length limit, and read into that array. (Isn't this how your COBOL's
SQL precompiler handles BLOB declarations anyway?)

We did the job using EXPORT utility to offload, TSM to archive, then DELETE
to remove the data after verifying that offloaded data has been dual copied.
ALl of this is driven by a pair of perl scripts.

> Hello -
>
[quoted text clipped - 27 lines]
>
> Kevin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.