Page 1 of 1

DB2 API

Posted: Thu Aug 24, 2006 1:08 pm
by mantenar
We are using IDOC extract job. We need to extract the data from IDOC and post the data in DB2 tables. Each IDOC has mutiple tables. I want to update the multiple tables in single logical unit of work using DB2 API stage. DB2 API stage in server job accepts multiple input links whereas DB2 API stage in PX does not accept multiple input links. I want to know if there is any way to pass mutiple input links to DB2 API stage in PX jobs.

If a PX job has mutiple Db2 API stages to update mutiple tables. Is there any way to specify the commit at the job level. That means that if an table update fails, then all the data should be rolled back. Please advise. thxs.

Posted: Thu Aug 24, 2006 1:16 pm
by DSguru2B
You can do that by multiple DB2 API stages too. Set the warn limit to 1 and the transaction size to 0. This way even with a single warning, the job will abort and the data will be rolled back.
or you can use the ODBC enterprise stage with transaction grouping.

Posted: Thu Aug 24, 2006 1:47 pm
by mantenar
[
Thanks for your response. How I can set the warn limit to 1. Is it a parameter I heard that perormance od ODBC stage is not very good compared to DB2 API. Is it really bad.

quote="DSguru2B"]You can do that by multiple DB2 API stages too. Set the warn limit to 1 and the transaction size to 0. This way even with a single warning, the job will abort and the data will be rolled back.
or you can use the ODBC enterprise stage with transaction grouping.[/quote]

Posted: Thu Aug 24, 2006 1:49 pm
by DSguru2B
When you hit run, a window appears, you can set the warn limit there in the gui representation. From command line you can use

Code: Select all

dsjob -run -warn 1 PROJECTNAME JOBNAME