More then a year ago I asked about reading DB2 EBCDIC data in a .Net program. The amazingly helpful answer included a routine for reading VARCHAR columns.
I am now faced with reading CLOB columns.
Is their internal structure similar in that the first word contains the actual size? Or is it the whole word, considering the possible length of the CLOB is much larger?
Thanks!
Not the mainframe but DB2/400 (midrange) appears to store CLOB fields externally from the table itself:
DSPPFM QTEMP/T1
Is there any particular reason you're not accessing the database using a DB/2 driver to handle all of these details? It's like reading from SQL server by trying to parse the .MDF files.
See IBM Redbooks | Large Objects with DB2 for z/OS and OS/390 chapter 4.4.1 LOB table space organization for more information.
This is a much more detail explanation of how to do so http://ripalsoni.wordpress.com/2008/07/24/how-do-i-read-write-oracle-clob-data-in-aspnet-or-vbnet/
Step 1: Add a reference – Oracle.Dataaccess.dll ( found in ODP.NET )
Step 2: Imports following namespaces
Step 3: Create a connection string
Step 4: Create Following Public Methods
Complete Source Code –