Iam planning to use this in the end of a sequence to fetch counts from both parallel as well as server jobs.Am i on the right track?
FUNCTION GetLinkCount(JobName, StageName, LinkName)
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
hJob = DSAttachJob((JobName), DSJ.ERRNONE)
Name = DSGetJobInfo(hJob, DSJ.JOBNAME)
If Name Matches "'-'1N0N"
Then
Ans = "Failed to attach job " : Quote(JobName)
End
Else
Temp = DSGetLinkInfo(hJob, StageName, LinkName, DSJ.LINKROWCOUNT)
Begin Case
Case Temp = DSJE.NOERROR
Ans = Temp
Case Temp = DSJE.BADSTAGE
Ans = "Stage name " : Quote(StageName) : " not found in job."
Case Temp = DSJE.BADLINK
Ans = "Link name " : Quote(LinkName) : " not found in job."
Case @TRUE
Ans = "Error encountered in DSGetLinkInfo. Code " : Temp
End Case
ErrCode = DSDetachJob(hJob)
End
RETURN(Ans)
I tried to test this routine directly using the Test boutine in server routine tab.I pass the name of the job,transformer name and link from the transformer to oracle stage
I get the output as
TEST #1
*******
Arg1 = Job_pre_app_fin
Arg2 = Transformer_51
Arg3 = DSLink52
Test completed.
Result = Error encountered in DSGetLinkInfo. Code 50
I cannot find this code anywhere?any ideas/ help?
GetLinkCount error.
Moderators: chulett, rschirm, roy