Record Count - ?

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
murur
Participant
Posts: 19
Joined: Wed Apr 14, 2004 7:55 am

Record Count - ?

Post 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:
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post 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
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Re: Record Count - ?

Post by neena »

Hi Muru,
Check the Datastage Basic Guide for
DSGetJobInfo Function
and DSJ.LINKROWCOUNT
Hope this works for u
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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