Page 1 of 1

how to store the no record passes through any active Stage

Posted: Sat May 20, 2006 2:24 am
by swarnkar
Hi,

I am new to Datastage, I want to track the no. of records that have been passes through the transformar to the file or table in a separate file.

Basically job log in director having that count like

J3RmsS4Lor..T: DSD.StageRun Active stage finishing.
8756128 rows read from ToT
8756128 rows written to ToTable

but is there any method by which i can store these statistics to a file.

Thanks in advance.

Posted: Sat May 20, 2006 5:11 am
by kumar_s
Hi,
There are several ways. Do a search.
@INROWNUM/@OUTROWNUM functions can be simply used to keep track of the number of records being passes across transformer.

Posted: Sat May 20, 2006 6:51 am
by chulett
Being new to DataStage, some of the advice you'll get will probably sound like Greek. If so, try taking the keywords and searching the forums here as pretty much any question you'd have has already been asked and answered. :wink:

Two more ways:

You can also create a new link in the job to an Aggregator stage, sending it pretty much any field that will never be null and tell it to 'count' them. You can even 'hard code' a value. The output, which can be written to a file, will match the output from the stage as long as the constraint on the links (if any) match.

You can also get this information after the job completes using the DSGetLinkInfo function with the DSJE.LINKROWCOUNT type. That's from memory, so may not be exactly right but should be close. Check your online help for the various 'DSGet' functions as they come in very handy.

Posted: Mon May 22, 2006 1:26 am
by swarnkar
Thank you very much i think DSJE.LINKROWCOUNT is a good solution.
chulett wrote:Being new to DataStage, some of the advice you'll get will probably sound like Greek. If so, try taking the keywords and searching the forums here as pretty much any question you'd have has already been asked and answered. :wink:

Two more ways:

You can also create a new link in the job to an Aggregator stage, sending it pretty much any field that will never be null and tell it to 'count' them. You can even 'hard code' a value. The output, which can be written to a file, will match the output from the stage as long as the constraint on the links (if any) match.

You can also get this information after the job completes using the DSGetLinkInfo function with the DSJE.LINKROWCOUNT type. That's from memory, so may not be exactly right but should be close. Check your online help for the various 'DSGet' functions as they come in very handy.

Posted: Mon May 22, 2006 1:31 am
by swarnkar
THANK YOU VERY MUCH.
kumar_s wrote:Hi,
There are several ways. Do a search.
@INROWNUM/@OUTROWNUM functions can be simply used to keep track of the number of records being passes across transformer.