Sequencers and Triggers
Hi,
I have a job that is called from a sequencer and reads from a table.
If the read produces no rows, I want to stop the sequencer, if it produces rows I want it to run the next job.
Is there a way to do this with in the sequencer??
Thanks,
John
Hi
Moderators: chulett, rschirm, roy
Aye Up, John!
you can call your own routine activity with a user-written routine to return then number of rows processed through a link for you. The routine would have
you can call your own routine activity with a user-written routine to return then number of rows processed through a link for you. The routine would have
Code: Select all
Handle = DSAttachJob(<JobThatWasCalled>,DS.LOGFATAL)
NumberOfRows = DSGetLinkInfo(Handle,<StageName>,<LinkName>,DSJ.LINKROWCOUNT)
Dummy = DSDetachJob(Handle)
Aye up Arnd,
Hope you're keeping well.
I written this:
Hope you're keeping well.
I written this:
But I get the following error when trying to compile the routine:Handle = DSAttachJob("JxDSSFCRSynTAMNAGRP01", DS.LOGFATAL)
Ans = DSGetLinkInfo(Handle, "OCI_T1_OFF_STRUCT_REF", "Ln_In_T1_NDS_OFF_STRUCT_REF", DSJ.LINKROWCOUNT)
Dummy = DSDetachJob(Handle)
0003 Ans = DSGetLinkInfo (Handle, "OCI_T1_OFF_STRUCT_REF", "Ln_In_T1_NDS_OFF_STRUCT_REF", DSJ.LINKROWCOUNT)
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
Array 'DSAttachJob' never dimensioned.
WARNING: Variable 'DS.LOGFATAL' never assigned a value.
Array 'DSGetLinkInfo' never dimensioned.
Array 'DSDetachJob' never dimensioned.
4 Errors detected, No Object Code Produced.
You need to have the following line in your job
to include the job mnemonics.
p.s. The jobname indicates you are still in the same place
. Do you recall that we still have something open? How is the project going?
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
p.s. The jobname indicates you are still in the same place
![Shocked :shock:](./images/smilies/icon_eek.gif)