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

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
mydearsyed
Participant
Posts: 11
Joined: Sat Mar 31, 2007 5:39 am
Location: Bangalore

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

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It is also possible that X3 had not been successfully compiled.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mydearsyed
Participant
Posts: 11
Joined: Sat Mar 31, 2007 5:39 am
Location: Bangalore

Post 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...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mydearsyed
Participant
Posts: 11
Joined: Sat Mar 31, 2007 5:39 am
Location: Bangalore

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

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

"You can never have too many knives" -- Logan Nine Fingers
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Post 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
mydearsyed
Participant
Posts: 11
Joined: Sat Mar 31, 2007 5:39 am
Location: Bangalore

Post 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..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mydearsyed
Participant
Posts: 11
Joined: Sat Mar 31, 2007 5:39 am
Location: Bangalore

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

Post by chulett »

:? As long as you understand that will affect all running jobs.
-craig

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