Number of records inserted/updated in each stage

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
fabianorb
Participant
Posts: 31
Joined: Fri Mar 05, 2004 12:00 pm

Number of records inserted/updated in each stage

Post by fabianorb »

Hi all,

I have many inputs and outputs in the jobs of my project. I need to know how many registers / records are reading and writing in all stages of my jobs.
How can I get the number of records inserted/updated in each of the stage (more exactly in Hashed Files and Tables - ORAOCI)?

Thank you

Fabiano
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... that's kind of a big question and the answer could vary based on your knowledge of DataStage. High level:

The answers you seek, Grasshopper, are all in the log. :wink: As each stage is "closed" (in the reverse order they are opened, BTW) the number of rows they processed are recorded. There are several ways to get this information back out of the log after a job ends, depending on if you want to do it from DataStage or out on the Command Line.

There is syntax in your manual for using the dsjob command at the Command Line to farm information like that. From a routine, you could use the four or five (?) DSGetLog* commands. Bring up your online help, go to the index and type in "DSGet" and look for all of the commands related to getting information from the log.

From Job Control or from a routine, you can also call (from memory, should be close) the DSGetLinkInfo function. One of its options is to return to you the number of rows that went down the Link you specify. This is an easy way to cherry-pick information about specific links from jobs.

Check those out and also search the forum as there is a lot of good information here on this subject. Your approach will probably depend on when you need this information and how you plan on using it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Fabiano,

follow the way Craig Hulett tells you and you can solve the problem.

If you are more fit in UNIX shellscripting in connect with sqlplus you can, as we did in our company write a shell script using the dsjob-programm.

By this you can write a nice programm to fill you table.

So there are so many ways. You just have to do it.

And beside this there is also a product called metastage on the market, which can do this task as well.

Wolfgang
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Here is the link for most of the code viewtopic.php?t=84960
Mamu Kim
Post Reply