Routine DSJ LINKROWCOUNT Error
Posted: Fri Aug 17, 2012 3:48 pm
Hi,
I have a before after job subroutine to capture records in a link , but I'm always getting result as -1 .
Below is my routine
$ INCLUDE DSINCLUDE JOBCONTROL.H
RoutineName = "TestRout"
StageName = Field (InputArg,",",1)
LinkName = Field (InputArg, ",",2)
vRowcount = 0
Errorcode = 0
mainJob = DSGetJobInfo(DSJ.ME,DSJ.JOBNAME)
JobName = mainJob
IF JobName = DSJE.BADHANDLE
THEN
Call DSLogWarn("cannot attach the job", " ")
Errorcode = 0
End
vRowcount = DSGetLinkInfo (JobName,StageName,LinkName,DSJ.LINKROWCOUNT)
Call DSLogWarn("Link Rowcount":" ":vRowcount, " " )
Errorcode = 0;
From above code I'm capturing the rowcount value in a log and I'm seeing -1 always, even the link processed 5 rows in a job, I also checked I'm getting proper JobName, stagename, LinkName before calling DSGetLinkInfo and they are passed correctly and I'm calling this routine as after job subroutine with parameter value Cpy_Output,To_Cpy_outlook. I'm trying to capture record count for active stage transformer.
Any help is greatly appreciated
Thanks
I have a before after job subroutine to capture records in a link , but I'm always getting result as -1 .
Below is my routine
$ INCLUDE DSINCLUDE JOBCONTROL.H
RoutineName = "TestRout"
StageName = Field (InputArg,",",1)
LinkName = Field (InputArg, ",",2)
vRowcount = 0
Errorcode = 0
mainJob = DSGetJobInfo(DSJ.ME,DSJ.JOBNAME)
JobName = mainJob
IF JobName = DSJE.BADHANDLE
THEN
Call DSLogWarn("cannot attach the job", " ")
Errorcode = 0
End
vRowcount = DSGetLinkInfo (JobName,StageName,LinkName,DSJ.LINKROWCOUNT)
Call DSLogWarn("Link Rowcount":" ":vRowcount, " " )
Errorcode = 0;
From above code I'm capturing the rowcount value in a log and I'm seeing -1 always, even the link processed 5 rows in a job, I also checked I'm getting proper JobName, stagename, LinkName before calling DSGetLinkInfo and they are passed correctly and I'm calling this routine as after job subroutine with parameter value Cpy_Output,To_Cpy_outlook. I'm trying to capture record count for active stage transformer.
Any help is greatly appreciated
Thanks