capture the count of number of records

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

capture the count of number of records

Post by vij »

Hi all,

I would want to know is there any way i can capture the accurate number of records which are inserted/updated to a DB2 table, after running the job?

Initially, I was using an after job sub-routine, which will get the link count, but i am not very sure whether it will be 100% accurate, as sometimes I have seen this scenario - 3 records loaded to DB2 stage, as per the designer but all 3 would be rejected, which can be seen in the director's log.

pls help me out.

Thanks in advance.

Vij
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

In the after job subroutine is it possible to query the database to get the statististics on the load into the table.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You can try doing this in multiple ways. Add a reject link in your target and subtract reject row count from main link row count (Pls. Feedback on this if you try this).
Using SQL statement in routine has been discusses many times in the forum, if you use search facility you will get all the required information about that.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

thanks for the replies.

If i use an after job subroutine and query the tables, how to get the actual number of records are updated for that particular run?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Since you are pondering a SQL solution, how would you do it from a pure SQL standpoint using your tool of choice? Disregarding DataStage, do you have audit columns in your target table that would even allow such a thing to be done?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Attend the Introductory class offered by IBM. Precisely this scenario is one of the lab exercises.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply