Page 1 of 1

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

Posted: Sat Feb 09, 2008 5:50 am
by mydearsyed
Hello All,

Our batch process has the following design


SEQUENCE X1 branches into two SEQUENCES X2 and X3

X2 is stand alone , while X3 continues with further sequences.

The batch process failed today because of the following eror messages logged.

Sequence X1 finished, status=1 [Finished OK]
Sequence X2 started
03:37:30: Exception raised: Sequence X2, Error calling Sequence, code=-2 [Job is not in the right state (compiled and not running)]
03:37:30: Sequence failed.

The sequence X3 did not start at all.

So , when X2 failed because of the error indicaed above, the entire batch process failed.

Could you please let me know that when X2 failed(for the reasons mentioned above) ,does the main schedule abort?..Please bear in mind that X3 had not started.



Regards
Syed

Posted: Sat Feb 09, 2008 5:57 am
by ArndW
What state was X3 in when the batch started - most likely it failed a previous run. When you use job activities you can specify "reset if required, then run" to avoid this issue.

Posted: Sat Feb 09, 2008 3:39 pm
by ray.wurlod
It is also possible that X3 had not been successfully compiled.

Posted: Sun Feb 10, 2008 2:03 pm
by mydearsyed
ray.wurlod wrote:It is also possible that X3 had not been successfully compiled. ...
X3 was successfully compiled..But I did one of the following..


The previous day...one of the jobs in X2 was in the running state since we had lost connection to the database. So I tried to stop this job..But couldnt..So wat I did was that I Cleared the status file( Job---Clear Status)

and it went to compile status...

Now , one observation is


X1 has trigger properties set as foolows.

Success--->Unconditional----->X2(leading to X2)
Success---->Conditional(OK)(leading to X3)
Failure----->Failed (Conditional)

And X1 completed successfully without any errors...I am of the opinion that though X2 and X3 are in parallel...first the nconditional trigger got fired ...and bcos of some reason(am investigating what :) )..the sequence X2 failed..So , since the sequence aborted ,though we have set a trigger property as Failed(conditional)..X3 did not continue...an abort in any of the sequence causes the entire schedule to fail.

Ray....please validate as I am quite a newbie in this area...

Posted: Sun Feb 10, 2008 3:10 pm
by ray.wurlod
Did X3 actually start and then abort, or did X3 not start at all? Look in the log of X3 to find out.

Posted: Sun Feb 10, 2008 3:38 pm
by mydearsyed
ray.wurlod wrote:Did X3 actually start and then abort, or did X3 not start at all? Look in the log of X3 to find out. ...
Hi Ray,

X3 did not start at all...

And also..as I mentioned ..it is X2 that failed with the message Job is not int he right state(Compiled and not running)..I had cleared the status of this job the previous day..

What does it mean by Compiled and not running...Please advise

Posted: Sun Feb 10, 2008 4:08 pm
by chulett
It means just what it says - a job must have been compiled and not be running in order to be started. You usually get that error when the job is already running, or if it is in an Aborted state and you haven't used 'Reset if required then run'.

Posted: Tue Feb 12, 2008 10:03 pm
by veera24
mydearsyed wrote:
ray.wurlod wrote:Did X3 actually start and then abort, or did X3 not start at all? Look in the log of X3 to find out. ...
Hi Ray,

X3 did not start at all...

And also..as I mentioned ..it is X2 that failed with the message Job is not int he right state(Compiled and not running)..I had cleared the status of this job the previous day..

What does it mean by Compiled and not running...Please advise
hi
u better recompile X2 again. Probably u could've used Reset if Required, Then Run this might help u to resolve it out.

Thanks,
veera

Posted: Wed Feb 13, 2008 4:51 am
by mydearsyed
Thanks for all your inputs..it did get resolved after i recompiled the job..

but , the main query that i have been pondering about it..l.if i clear the status of a job by using job--> clear status..even though it is compiled, could it be possible that there is still a zombie process runnning in the background that wud have caused this failure.

I mean...i have a premonition that Clear status file can be a dangerous affair when I want to stop a job that is in the running state....Please advise..

Posted: Wed Feb 13, 2008 4:59 am
by ray.wurlod
Clear Status file is dangerous. That's why it asks "are you sure?" twice.

Please use correct English on DSXchange. The word "wud", whatever it is, is not a past tense or subjunctive form of the verb "to be".

Posted: Wed Feb 13, 2008 6:42 am
by mydearsyed
In that case , I think the best way to stop a running process(in case Job---> clean up resources takes a long time) is to restart datastage services and then compile the job.

Posted: Wed Feb 13, 2008 8:05 am
by chulett
:? As long as you understand that will affect all running jobs.