cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver - INSERT issue

Former Member
0 Kudos

Hi all.

Let's assume I have a document with a number of INSERT statements :

- <p2:XXX xmlns:p2="http://abc.com">

- <UPDATE_INSERT>

- <IN_MAT action="INSERT">

<table>MY_TAB</table>

- <access>

<MANDT>030</MANDT>

<WERK>LW01</WERK>

<MATNR>PFS</MATNR>

<INTIME>04.07.2005</INTIME>

<MATTYP>0012</MATTYP>

<MATXT>PFS</MATXT>

<GMIEN>PJM</GMIEN>

<RATIO>0000000001.000</RATIO>

</access>

</IN_MAT>

</UPDATE_INSERT>

- <UPDATE_INSERT>

- <IN_MAT action="INSERT">

<table>MY_TAB</table>

- <access>

<MANDT>030</MANDT>

<WERK>LG01</WERK>

<MATNR>HPL</MATNR>

<INTIME>16.06.2005</INTIME>

<MATTYP>0013</MATTYP>

<MATXT>HPL</MATXT>

<GMIEN>ARK</GMIEN>

<RATIO>0000000005.330</RATIO>

</access>

</IN_MAT>

</UPDATE_INSERT>

......

......

Is there any way to process them in separate way. I mean

that in case of failure (for any reason) in one INSERT

rest of them wasn't rolled back??

I guess, that usually a whole XML message is rolled back.

Am I right?

Regards,

Grzegorz.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I agree with Ravikumar, it might be a better idea to use an ODBC and try to configure it. I've seen in the iSeries Access from IBM that some "commit" options can be configured.

Former Member
0 Kudos

OK.

Thanks guys for your opinion.

Regards,

Grzegorz.

Former Member
0 Kudos

Just a wild option...:) ..

i think it will work...but it may not be a very pretty one...Just thinking along the lines of having a commit after every statement...Your message would be something like this...

- <p2:XXX xmlns:p2="http://abc.com">

- <UPDATE_INSERT>

- <IN_MAT action="INSERT">

<table>MY_TAB</table>

- <access>

<MANDT>030</MANDT>

<WERK>LW01</WERK>

<MATNR>PFS</MATNR>

<INTIME>04.07.2005</INTIME>

<MATTYP>0012</MATTYP>

<MATXT>PFS</MATXT>

<GMIEN>PJM</GMIEN>

<RATIO>0000000001.000</RATIO>

</access>

</IN_MAT>

</UPDATE_INSERT>

<Commit_STAT>

<docommit action="SQL_DML">

<access>COMMIT WORK</access>

</docommit>

</Commit_STAT>

- <UPDATE_INSERT>

- <IN_MAT action="INSERT">

<table>MY_TAB</table>

- <access>

<MANDT>030</MANDT>

<WERK>LG01</WERK>

<MATNR>HPL</MATNR>

<INTIME>16.06.2005</INTIME>

<MATTYP>0013</MATTYP>

<MATXT>HPL</MATXT>

<GMIEN>ARK</GMIEN>

<RATIO>0000000005.330</RATIO>

</access>

</IN_MAT>

</UPDATE_INSERT>

<Commit_STAT>

<docommit action="SQL_DML">

<access>COMMIT WORK</access>

</docommit>

</Commit_STAT>

......

......

Thanks & Regards,

Renjith

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes you can by sending the message through the BPM to split it into several UPDATE_INSERT statements.

Former Member
0 Kudos

I considered using BPM but this will cause a lot of messages traffic. That's why I was wondering if there exists any other way - that jdbc driver or DBMS can somehow handle it.

Of course if there is no other way I'll use BPM.

Regs,

Grzegorz.

Former Member
0 Kudos

Grzegorz,

I think XI gives only one option of splitting or merging messages and that's BPM.

So, I guess you are not left with many options here.

Regards,

Ravi