Page 1 of 1

BLOBs and DB2

Posted: Thu Nov 17, 2005 11:24 am
by tacitus
Hi,

I recieved the following error when trying to write to DB2:

"Unable to bind a pointer to database field `Err_Rec_Txt'; it may be bound to an unsupported type."

After a little research it appears that BLOB is not a supported DataStage type. So how do we store a non-numeric value greater than 4000 bytes? Or read for that matter?

Your insight would be greatly appreciated!

Posted: Thu Nov 17, 2005 1:52 pm
by Bala R
Did you try using LongVarBinary?

Posted: Fri Nov 18, 2005 10:02 am
by tacitus
Hi Bala,

Thanks for the suggestion. Unfortunately it gives the same error.

Posted: Fri Nov 18, 2005 10:34 am
by Bala R
If you are trying to insert a BLOB in a stage that was selected from a upstream stage then you cannot do that since the pointer becomes invalid. This is true in Oracle but I am not sure how it is in DB2. Anyways you could try loading the BLOB into a seqential file and then insert into table from file. Hope that helps.

Posted: Fri Nov 18, 2005 2:06 pm
by tacitus
Hi Bala, Unfortunately I am trying to create the BLOB/CLOB (I would use either..in fact I lean towards CLOB) but I can't get either to work. I have tried manipulating datatypes but nothing seems to work. I have used CLOB in 7.1 with oracle in the past with no trouble.

I don't know if things became stricter in 7.5 or if it is a DB2 thing. I am running out of ideas. Any help is appreciated.

Posted: Fri Nov 18, 2005 2:40 pm
by tacitus
Ok. So gave up on the enterprise db2 stage and I was able to write to a CLOB in DB2 using the API stage when I assigned an arbitrary large length for the LongVarChar.

Of course the downside here is that the API in parallel does not allow you to reject rows since it does not have a reject link and the input link will still think the record was handled successfully and so you can't use OTHERWISE.

Not very good for error handling...