DB2 API

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
mantenar
Participant
Posts: 2
Joined: Thu Feb 09, 2006 2:21 pm

DB2 API

Post 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.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mantenar
Participant
Posts: 2
Joined: Thu Feb 09, 2006 2:21 pm

Post 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]
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply