Page 1 of 1

DSGetLinkInfo error

Posted: Wed May 13, 2009 2:33 pm
by ramnishgupta
I have a job where i use a roune that attaches the job and uses DSGetLinkInfo function to get the link statistics of all links in the ETL job.

The routine works well with all links in the job howewer when the link is an input to the container i get an error Unknown link -9. Is there a way in which i can get the link stats for the link that writes to the container.

Below is the code in the routine

$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
handleJob = DSAttachJob(JobName,DSJ.ERRWARN)
Ans = DSGetLinkInfo (handleJob, StageName, LinkName, DSJ.LINKROWCOUNT)
DetachResult = DSDetachJob(handleJob)

Posted: Wed May 13, 2009 3:42 pm
by mikegohl
Try to use the stagename before the container or use a link in the container with the container name first.

Ans = DSGetLinkInfo (handleJob, ContainerName.StageName, LinkName, DSJ.LINKROWCOUNT)

Posted: Wed May 13, 2009 3:50 pm
by chulett
The stage needs to be an active stage from what I recall, so best to point to the output link on the transformer that feeds the shared container rather than the container itself.