Getting count of records passed through a link
Moderators: chulett, rschirm, roy
Getting count of records passed through a link
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?
Its not a multi instance job. I am using the same server job and the same routine for getting link counts for different jobs (both parallel and server).
The routine when called from a transformer returns right values for parallel jobs, but for server jobs, the link count returned is 0.
However it gives right values for both server and parallel jobs when we test the routine in DS Manager.
The routine when called from a transformer returns right values for parallel jobs, but for server jobs, the link count returned is 0.
However it gives right values for both server and parallel jobs when we test the routine in DS Manager.
For the source link count , I am passing the sequential file stage name and for the taget link count, I am passing the target OCI table stage name.
In the transformer the folowing functions are used:
GetLinkCount('ServerJob_Name', 'Source_Stage_Name', 'Source_link') //for source link count
GetLinkCount('ServerJob_Name', 'Target_Stage_Name', 'target_link') //for target link count
In the transformer the folowing functions are used:
GetLinkCount('ServerJob_Name', 'Source_Stage_Name', 'Source_link') //for source link count
GetLinkCount('ServerJob_Name', 'Target_Stage_Name', 'target_link') //for target link count
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore