How to capture the rows rejected by DB2 API Stage.

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
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

How to capture the rows rejected by DB2 API Stage.

Post by somu_june »

Hi,

I read in documentation in DB2/API stage plugin . The rows that are rejected due to unique constraint Violations or Data type mismatches can be captured by setting the Array size to 1 and I made the reject link in transformer and sending to sequential file . But no records are sending to Reject link i.e to sequential file if there is a unique constraint error. In my job Iam using two DB2 API stages one for update and one for insert and then to reject link . Will this work if have two DB2 /API stage. Can any one tell me how to capture rejected rows by DB2/API stage .



Thanks,
Somaraju.
somaraju
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Have you tried the Other wise option?
Try the reject link on the same API stage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Post by somu_june »

Hi Kumar,


Please correct me if Iam wrong . Otherwise option is only if the constraint of other link is not satisfied then it goes to this link . I want to catch the records that are failed to insert in to the DB2 table due to any error like DB2 errors and errors that I mentioned above.



Thanks,
Somaraju
somaraju
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Iam too not sure about the change in Array size option in DB2 stage and the reject in a transformer prior to that stage. Have you tried the reject link directly from the DB2 stage?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Post by somu_june »

Hi kumar_s,

Iam using DB2 /API stage and I couldnot find this option reject link directly from the DB2 stage?[/quote]. I think option available for DB2 enterprise stage and not for DB2 /API stage.






Thanks,
Somaraju.
somaraju
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

No reason to use the API stage in parallel jobs, you should be using the enterprise stage instead.
koolnitz
Participant
Posts: 138
Joined: Wed Sep 07, 2005 5:39 am

Post by koolnitz »

Vincent,

There can be reasons - like in our case, we have our target DB non-partitioned (it's DB2). We cannot use DB2 EE stage unless the database it is pointing to is partitioned. And that's what has been told by IBM support.
Nitin Jain | India

If everything seems to be going well, you have obviously overlooked something.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

IBM India or worldwide support?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
koolnitz
Participant
Posts: 138
Joined: Wed Sep 07, 2005 5:39 am

Post by koolnitz »

IBM support, North America
Nitin Jain | India

If everything seems to be going well, you have obviously overlooked something.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I've learned something today. :o
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bmadhav
Charter Member
Charter Member
Posts: 50
Joined: Wed May 12, 2004 1:16 pm

Post by bmadhav »

we have the same experience. we cannot use the DB2 EE stage, since the DB2 server on the mainframe is not DB2 enterprise edition.
we are forced to use DB2 API stage.
surojeet
Participant
Posts: 2
Joined: Wed Jan 18, 2006 5:59 pm

DB2API Stage really sluggish

Post by surojeet »

Hi,

I too had some horrible experience with DB2 API stage. I work with DS ver 7x on Unix with DB2 on Mainframe as back end, and thats why forced to use DB2 API stage, but to my disappointment its really slow. Especially at inserting records. Its hardly 500-600 rows per second, which takes hours to complete a job handling 4-5 million records.

I want to get a general conception, is DB2 API stage really that slow ? or my particular environment is sluggish ?

Also I would ask Mr. Somaraju, finally how did he handled the Reject records issue in DB2 API stage. Please share , it will help me a lot.

Regards,
Surojeet
Surojeet Gantayat
We are never gonna survive...unless we are a litttle crazy !
bmadhav
Charter Member
Charter Member
Posts: 50
Joined: Wed May 12, 2004 1:16 pm

Post by bmadhav »

surojeet

DB2 API stage is a sequential stage and based on the network bandwith u have betn the mainframe and AIX server, it will further slow it down.
For inserting large volumes of data, it will be faster to FTP the sequential files to the mainframe and load it thru a DB2 load utility, which slams the data into the target table.
we use this process and get to load 2-3 million rows of data in less than 30 minutes.
Post Reply