vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| 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. "Kevin" <kdh4@dcx.com> wrote in message news:1103043590.564436.122620@c13g2000cwb.googlegr oups.com... > 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 > |