Page 1 of 1

Job is not in the right state (compiled and not running

Posted: Tue Jan 11, 2011 8:18 am
by caola
Hi all

My MainSequence job is like:

StartLoop------->Invoke JobSequence1------>Invoke JobSequence2---->EndLoop


JobSequence2 is multi-instance, and each time the same instance is invoked within the loop. I choose "Reset if required then run" when invoking JobSequence2. And the trigger is set as "Unconditional", so no matter if JobSequence2 finish/abort, it will go to next cycle.

I got below weird error randomly in MainSequence when trying to start the JobSequence2 multiple times.

MainSequence..JobControl (DSPrepareJob): Attempting to reset failed job JobSequence2.instance1
MainSequence -> (JobSequence2.instance1): Job reset requested
MainSequence..JobControl (DSRunJob): Waiting for job JobSequence2.instance1 to start
MainSequence..JobControl (DSWaitForJob): Waiting for job JobSequence2.instance1 to finish
MainSequence..JobControl (DSWaitForJob): Job JobSequence2.instance1 has finished, status = 1 (Finished OK)
MainSequence..JobControl (@JobSequence2): Controller problem: Error calling DSRunJob(JobSequence2.instance1), code=-2
[Job is not in the right state (compiled and not running)]

It's reset, but the status is 1. Shouldn't it be 21?

I checked the status of JobSequence2.instance1, it's "Has been reset".

Has any one happened to encounter the same situation? Is there any solution?

Appreciate your help...

Posted: Wed Jan 12, 2011 12:05 am
by Kirtikumar
As you as you get this reply in logs, have you tried running the sequence2 manually or may be using DSRunJob? Is it working that ways?

Posted: Wed Jan 12, 2011 3:22 am
by priyadarshikunal
try to disable auto purge and see if the problem goes away. Please let us the know the exact version of datastage. 8.0.x has problems running multi-instance jobs with auto purge on.

A search can reveal all the information on this error as it has been answered multiple times.