Reg LinkRowcount

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
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Reg LinkRowcount

Post by raj_konig »

Folks,

I am trying to capture the no of rows passing thru a particualr link. For this i am using the following code

"DSGetLinkInfo(jobhandler('test'), "Target", "Insert", DSJ.LINKROWCOUNT)"

where jobhandler is the userdefined routine to retireve the JobHandle for the job 'test'.

'Target' is my stage name.

'Insert' is my Link name.

Let me know is there any change to the above code as the reuslt is just showing '0' instead of no of records passed thru tht link.

rajesh
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

I got the row count.

Actaully I am using the wrong stage.

Stagename should be the name of the stage from which the rows start flowing into that link.

But how can we get the link row count if the data is flowing into passive stage(Sequential file) instead of active stage?

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

Post by chulett »

From the Transformer in front of it. And if you ain't got one - add one. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

I do have transformer before that.

Actually i have source table from which the data is coming into the transformer and based on some conditions i am splitting data into sequential file and into database table. i could be able to get the count of records inserted into the databse table as it is active stage. but could get the same for sequnetial file.

the job looks like this

SOURCE ---> TRANSFORMER-----> DATABASE TABLE
|
|
|
SEQUENTIAL FILE
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

Correction from my side regarding the way the job looks like,

actually the link for the sequential file is coming from transformer not from the source. which i couldnt represent here.


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

Post by chulett »

Still, you should be able to use the Transformer name and the Link name going to the Sequential File stage from there to get how many rows went down it. Same for any Database stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

raj_konig wrote:Correction from my side regarding the way the job looks like,

actually the link for the sequential file is coming from transformer not from the source. which i couldnt represent here.


thanks
rajesh
Wrap your diagram in code tags, and use Preview to get it right.

Code: Select all

SOURCE ---> TRANSFORMER-----> DATABASE TABLE 
               | 
               | 
               V 
          SEQUENTIAL FILE
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

Craig,

I did the same thing but the result i am getting for a sequentail file is '0' but for a database the result is correct.

Thanks ray for the info.

rajesh
Post Reply