BLOBs and DB2

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
tacitus
Participant
Posts: 13
Joined: Fri Feb 25, 2005 5:46 pm
Location: Boston, MA

BLOBs and DB2

Post 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!
Bala R
Participant
Posts: 66
Joined: Mon May 30, 2005 9:52 pm

Post by Bala R »

Did you try using LongVarBinary?
tacitus
Participant
Posts: 13
Joined: Fri Feb 25, 2005 5:46 pm
Location: Boston, MA

Post by tacitus »

Hi Bala,

Thanks for the suggestion. Unfortunately it gives the same error.
Bala R
Participant
Posts: 66
Joined: Mon May 30, 2005 9:52 pm

Post 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.
tacitus
Participant
Posts: 13
Joined: Fri Feb 25, 2005 5:46 pm
Location: Boston, MA

Post 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.
tacitus
Participant
Posts: 13
Joined: Fri Feb 25, 2005 5:46 pm
Location: Boston, MA

Post 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...
Post Reply