Page 1 of 1

Record Count - ?

Posted: Fri Apr 30, 2004 8:48 am
by murur
from one transformer stage sending records to TWO different Sequential file(FILE1 & FILE2).

I want to write the record count of FILE1 and FILE2 in a status file
in the following format.

Date,File1_record_count,File2_record_count
1/1/04,27,35

Now I am using two aggregator to derive the count for FILE1 and FILE2

Question is:


Is there any other runtime variable stores the Link record count. which I can use it.

In JOB status EMAIL,we are getting number of row processed in detail, those information available as system variable?

Thank you,
Muru
:roll:

Posted: Fri Apr 30, 2004 9:04 am
by WoMaWil
Yes, they are available. There are Functions (is suppose something like DSJobLinkInfo..) you can ask for this informations. Have a look in your manual.

Wolfgang

Re: Record Count - ?

Posted: Fri Apr 30, 2004 9:14 am
by neena
Hi Muru,
Check the Datastage Basic Guide for
DSGetJobInfo Function
and DSJ.LINKROWCOUNT
Hope this works for u

Posted: Fri Apr 30, 2004 6:16 pm
by ray.wurlod
Beware that all DataStage function names are case sensitive. Further, the link row count is obtained from DSGetLinkInfo, not from DSGetJobInfo function.

As a graphical alternative, you could generate two more outputs, with a counter (fed by @OUTROWNUM), pass these through Aggregator stages applying a MAX or LAST set operation, and the output from these to target files that would contain your row counts - no need for code!

Yet another code-based method is to find the log event for "active stage finishing", which contains link row counts for all links connected to that stage; you can read this (DSGetLogEntry) and do whatever you will with the contents.