Datastage Parallel Xtender

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bhags
Participant
Posts: 2
Joined: Thu May 31, 2007 12:50 pm
Location: St Louis

Datastage Parallel Xtender

Post by bhags »

I am reading a source table and writing a dataset.From dataset i am loading the data to target table.Finally i need to check number of rows read from source and number of rows written in target.If the row count does not matches i need to abend the job.Is there any specific function to achieve this.Please advice.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no single function that does this, but with PX you won't need to check, since you can use the reject link on the database stage to ensure that no records are dropped.
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Make sure there is no nullable yes to nullable no field mapping. And put a reject link on the oracle stage to transformer. In the transformer set the output constraint to abort after 1 row.
Perwezakh
Premium Member
Premium Member
Posts: 38
Joined: Mon Jun 06, 2005 9:13 am
Location: Chicago, IL

Re: Datastage Parallel Xtender

Post by Perwezakh »

bhags wrote:I am reading a source table and writing a dataset.From dataset i am loading the data to target table.Finally i need to check number of rows read from source and number of rows written in target.If the row count does not matches i need to abend the job.Is there any specific function to achieve this.Please advice.
FIrst of all some one is confusing you in your work. Just ask who is telling you to do this that how can compare the number of records before writting it to target table. You can count the number from source by ROWNUM fuction but to get the row count to target you have apply reject file logic and do the count matching logic in shell scripts. By you can do all these matching after complete run of your DataStage job. You won't be able to stop your DataStage job based on the output of shell. Explain this example to your designer who is telling you to do this........
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Re: Datastage Parallel Xtender

Post by VCInDSX »

bhags wrote:...If the row count does not matches i need to abend the job.Is there any specific function to achieve this.Please advice.
I think Perwezakh has a good point....
Try to gather all details about the requirements...

When you say "abend", is it just "end" the job.... and may be abort a sequence that might have other jobs in it that are dependant upon the Target table having all the data for further processing?

Will the target table already have records from previous loads...?

What about DB cleanup? if incomplete data has been loaded, would that be rolled-back?

If your design has a temporary staging area where you first update that and perform your gate checks, that might help... but it will add an extra step to your final loading process to copy from the staging area to the target table.

Cheers!!!
-V
Post Reply