odbc problem with DB2 cannot upsert

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
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

odbc problem with DB2 cannot upsert

Post by kjaouhari »

Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes, if the record already exists then the "insert" generates the error you posted. If you do an update first, then an insert, you will not see this error.
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

Ok so nothing to investigate then ... too bad :lol:
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

Ok so nothing to investigate then ... too bad :lol:
ririr
Participant
Posts: 84
Joined: Sun Apr 04, 2004 8:59 pm

Re: odbc problem with DB2 cannot upsert

Post by ririr »

Hi Kjaouhari,

Can you please share the steps you executed to setup the ODBC for DB2.
I get SMEC error when I try to bind DB2 ODBC database.

./bind19 XXXXXX(ODBC)
User Name: abcdef
Password: xxxxxx
Package creation failed!: SECMEC value not supported, check for missing user/password.


Package creation failed!: SECMEC value not supported, check for missing user/password.
kjaouhari wrote:Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance
ririr
Participant
Posts: 84
Joined: Sun Apr 04, 2004 8:59 pm

Re: odbc problem with DB2 cannot upsert

Post by ririr »

Hi Kjaouhari,

Can you please share the steps you executed to setup the ODBC for DB2.
I get SMEC error when I try to bind DB2 ODBC database.

./bind19 XXXXXX(ODBC)
User Name: abcdef
Password: xxxxxx
Package creation failed!: SECMEC value not supported, check for missing user/password.

kjaouhari wrote:Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: You need to start your own post on this subject, not hi-jack another thread where the only common element is the database vendor.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply