Alternate option to DSGetLinkInfo

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
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Alternate option to DSGetLinkInfo

Post by yaminids »

Friends,

Currently I'm working on a task which requires me to update the log table with the number of records processed each time the job is executed.

The design of the job is quite simple. It extracts data from 2 tables in the source db and writes to 2 tables in the destination db

STBL1==>Transformer1==>DTBL1
STBL2==>Transformer2==>DTBL2


The requirement is to update the log table with the number of records extracted from the source and written to the destination db.

I wrote a custom routine which uses "DSGetLinkInfo". But the problem is that I have wait for the completion of the job to invoke the custom routine to get the number of records processed in the link.

Is there any other way to get the number of records processed through a link from within the job

Thanks
Yamini
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, but you have to wait to the end anyway to get the correct count.

The value of system variable @OUTROWNUM will be correct in the final row. Indeed it will be correct at all times on all output links.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Typically one would use an Aggregator to get this kind of count 'in job'. You can count rows or max the rowcount that Ray mentioned, then sent it to your target.
-craig

"You can never have too many knives" -- Logan Nine Fingers
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Post by yaminids »

Thanks Ray.
Can you please explain how I can get the max value by using @OUTROWNUM

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

Post by chulett »

The last value will be the max value... so, an Aggregator set to Last or Max would be one solution.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Pacific007
Participant
Posts: 35
Joined: Wed Oct 06, 2010 11:24 am

Re: Alternate option to DSGetLinkInfo

Post by Pacific007 »

Hi Yamini,

It is not possible to get details before finishing the job. You can use DSJobreport afterjob subroutine to get any kind of details depends on the parameters you pass in the subroutine.

How this will help you...
Pacific
Post Reply