Datastage Parallel Xtender
Moderators: chulett, rschirm, roy
Datastage Parallel Xtender
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.
Re: Datastage Parallel Xtender
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........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.
Re: Datastage Parallel Xtender
I think Perwezakh has a good point....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.
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