Prob lem running UNIX script for a DataStage job

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
lsnovick
Participant
Posts: 80
Joined: Fri May 25, 2007 7:24 am
Location: Troy

Prob lem running UNIX script for a DataStage job

Post by lsnovick »

I have a unix script that calls a DataStage job. this job runs fine when it runs on it's own. I know the script is good because it runs other jobs fine. Here is the error when the script calls the job:

Error running job

Status code = -2 DSJE_BADSTATE.

Not much to go on. Anyone see this problem before?
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Re: Prob lem running UNIX script for a DataStage job

Post by kwwilliams »

It looks like you job needs to be in a runnable state when the script attempts to execute the job. You could catch this error and attempt to reset the job if it is in a bad state.
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

Status code = -2 DSJE_BADSTATE.
will be thrown usually when a job is not in a runnable state.You can compile the job and can run the screipt again.

As a usual practice we used to reset the job in the script only.
Raghavendra
Dare to dream and care to achieve ...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Not in a runnable state" includes "already running". Check that you don't have the script trying to start the same job twice, or two scripts trying to start the same job at similar times.

Otherwise check that the job status is one of "finished", "finished (see log)", "validated", "validated (see log)", "compiled" or "has been reset". These are the only status values that indicate that the job is in a runnable state.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply