Hi All,
I have a requirement where based on tgt table rowcount in a job, I have to branch my sequencer flow. Please let me know if there is a way to acheive this from Sequencers.
JobA -> JobB (if tgtrows of JobA=0) -> JobD (if tgtrows of JobB=1) -> JobE, etc...
-> Jobc (if tgtrows of JobA=1)
After JobA, if tgt rows of JobA is 0 Then run JobB else run JobC. After JobB, if tgt rows of JobB is 1 then run JobD
Preethi
Design job flow based on tgt table row count.
Moderators: chulett, rschirm, roy
Re: Design job flow based on tgt table row count.
How are you counting the rows to target? If you are writing the count to a file in each job, then you will have to use a Execute Command stage after each job to return the count, and then set the Triggers as follows -
JobA Trigger (to JobB) : ExecuteCommand_A.$ReturnValue = 0
JobA Trigger (to JobC): ExecuteCommand_A.$ReturnValue = 1
JobB Trigger (to JobD) : ExecuteCommand_B.$ReturnValue = 1
You may handle other ReturnValues accordingly.
JobA Trigger (to JobB) : ExecuteCommand_A.$ReturnValue = 0
JobA Trigger (to JobC): ExecuteCommand_A.$ReturnValue = 1
JobB Trigger (to JobD) : ExecuteCommand_B.$ReturnValue = 1
You may handle other ReturnValues accordingly.
gateleys
Hi Preethi,
This can be done but you have to create a basic routine which should contain Basic code something like this and return the record count
JobHandle = DSAttachJob(jobname,DSJ.ERRWARN)
rowcount = DSGetLinkInfo(JobHandle,stagename,linkname,DSJ.LINKROWCOUNT)
Do a search on Server Forum. It has many samples.
Use the Routine Activity after each Job Activity and call the custom routine to find the rowcount. Then you can branch out based on the output.
HTH
--Rich
This can be done but you have to create a basic routine which should contain Basic code something like this and return the record count
JobHandle = DSAttachJob(jobname,DSJ.ERRWARN)
rowcount = DSGetLinkInfo(JobHandle,stagename,linkname,DSJ.LINKROWCOUNT)
Do a search on Server Forum. It has many samples.
Use the Routine Activity after each Job Activity and call the custom routine to find the rowcount. Then you can branch out based on the output.
HTH
--Rich