DSGetLinkInfo error

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
ramnishgupta
Participant
Posts: 13
Joined: Tue Nov 08, 2005 9:43 am

DSGetLinkInfo error

Post 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)
mikegohl
Premium Member
Premium Member
Posts: 97
Joined: Fri Jun 13, 2003 12:50 pm
Location: Chicago
Contact:

Post 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)
Michael Gohl
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply