Page 1 of 1

Problem using routie in custom condition in Jobactivity stag

Posted: Fri Jun 13, 2008 12:25 pm
by dstest
I created the following routine and i compiled it and it is successfully compile.But when i sued it in job activity custom conditon i am getting the follwoing error when i compiled that sequence.

$INCLUDE DSINCLUDE JOBCONTROL.H

JobHandle=DSAttachJob(JobName,DSJ.ERRFATAL)
JobStatus=DSGetJobInfo(JobHandle,DSJ.JOBINTERIMSTATUS)
Ans=JobStatus


Compiling: Source = 'RT_BP79/JOB.45753036.DT.1464866372', Object = 'RT_BP79.O/JOB.45753036.DT.1464866372'
*********************************************************************************************************************************
Array 'TestStat' never dimensioned.

1 Errors detected, No Object Code Produced.
(SeqTest)

Can any one please help me to come out from this problem.

Posted: Fri Jun 13, 2008 2:00 pm
by chulett
:? What do you mean by 'job activity custom conditon'? A routine would be leveraged via a Routine Activity stage, not a Job Activity stage or in a Trigger expression.

Posted: Fri Jun 13, 2008 2:13 pm
by umamahes
I mean in the JobActivity stage Trigger expression

Posted: Fri Jun 13, 2008 2:14 pm
by umamahes
I mean in the JobActivity stage Trigger expression

Posted: Fri Jun 13, 2008 3:19 pm
by chulett
And you are the same as the original poster? :?

As noted, you cannot use a routine in a trigger expression. The ellipsis 'picker' thingy may let you pick one but they cannot be used there. And now you've see the error generated when you attempt to. You should be using a Routine Activity stage to call it and then check the $ReturnValue in a Trigger.

Are you sure you want to be checking JOBINTERIMSTATUS in a Sequence when by then I assume the job ran to completion?

Posted: Sat Jun 14, 2008 4:19 am
by ag_ram
As noted, you cannot use a routine in a trigger expression. The ellipsis 'picker' thingy may let you pick one but they cannot be used there.
Chulett - Any reason behind for it has been like that?

Posted: Sat Jun 14, 2008 7:00 am
by chulett
[shrug] Common widget, I assume.