Number of record affected by SQL operations in the job

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Number of record affected by SQL operations in the job

Post by jseclen »

Hi Forum, :)

I'm migrating DTS processes to DataStage jobs, but, in this DTS the customer use code to insert record in a log table, this log table contains all sql operations including the number of records affected, for example, after an insert, delete or update sentence. In sql server, this is possible but in DataStage??

Can i captured this results and use it ???

Thanks,
Saludos,

Miguel Seclén
Lima - Peru
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not directly. DataStage records the number of rows sent, and the SQL can be captured through stage tracing. Sending this information to a log could also be done, but you would need to design this yourself (just as you would have to script it in DTS). Exactly how would depend on the format of your log - in particular whether it is a text file or a database table. You specified "log table" so possibly the easiest method for you is a DataStage server job that collects and writes the information.

Much of this already exists in downloadable form in the ETLStats package, from
Kim Duke's website
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
baglasumit21
Participant
Posts: 132
Joined: Wed Mar 01, 2006 11:12 pm
Location: Pune

Re: Number of record affected by SQL operations in the job

Post by baglasumit21 »

jseclen wrote:Hi Forum, :)

I'm migrating DTS processes to DataStage jobs, but, in this DTS the customer use code to insert record in a log table, this log table contains all sql operations including the number of records affected, for example, after an insert, delete or update sentence. In sql server, this is possible but in DataStage??

Can i captured this results and use it ???

Thanks,
Hi Jseclen,
It is not possible the achieve this directly in Datastage. However you can use a hashed file and transformer to get the number of rows for each operation(insert, delete or update ) and then insert rocord in log table for each of them. You will have to do a little bit of programming in datastage for it. :)
SMB
Post Reply