Getting count of records passed through a link
Posted: Tue Dec 16, 2008 10:04 am
I have a routine GetLinkCount() that returns right values when called from a sequence on a parallel job. But when the routine is called for a server job it returns 0.
However when the routine is tested from the manager console , it gives correct row count. But when the same routine is called from a transformer of a server job, it gives the source and target link counts of any other server job as 0.
the following is the code:
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
handleJob = DSAttachJob(JobName, DSJ.ERRFATAL)
If NOT(handleJob) Then
Call DSLogFatal("Job Attach Failed", "JobControl")
Abort
End
Else
Ans = DSGetLinkInfo (handleJob, StageName, LinkName, DSJ.LINKROWCOUNT)
End
DetachResult = DSDetachJob(hJob)
Is this because any function used in the routine is not applicable for server jobs?
However when the routine is tested from the manager console , it gives correct row count. But when the same routine is called from a transformer of a server job, it gives the source and target link counts of any other server job as 0.
the following is the code:
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
handleJob = DSAttachJob(JobName, DSJ.ERRFATAL)
If NOT(handleJob) Then
Call DSLogFatal("Job Attach Failed", "JobControl")
Abort
End
Else
Ans = DSGetLinkInfo (handleJob, StageName, LinkName, DSJ.LINKROWCOUNT)
End
DetachResult = DSDetachJob(hJob)
Is this because any function used in the routine is not applicable for server jobs?