Problem using routie in custom condition in Jobactivity stag

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dstest
Participant
Posts: 66
Joined: Sun Aug 19, 2007 10:52 pm

Problem using routie in custom condition in Jobactivity stag

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

Post by umamahes »

I mean in the JobActivity stage Trigger expression
HI
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

Post by umamahes »

I mean in the JobActivity stage Trigger expression
HI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post 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?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

[shrug] Common widget, I assume.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply