Page 1 of 1

UNIX just resetting the job

Posted: Thu Dec 06, 2007 12:16 am
by Tupe
Hello,

I am trying to run a datastage job in UNIX command line but when executed instead of running the job it just resets it. I already tried compiling the job then re run but it still resets the job. It shows this error:

Status code = -2 DSJE_BADSTATE
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>

The command I used in running calls a UNIX script which provides all the parameters needed by the job. This script is used on other datastage jobs as well with no problem.

Posted: Thu Dec 06, 2007 12:38 am
by kcbland
Please post the command line being executed. We can't point out syntax issues unless we can see the syntax used.

Posted: Thu Dec 06, 2007 1:07 am
by ray.wurlod
DSJE_BADSTATE indicates that the job is not in a runnable state. I doubt that it's even being reset. Capture the jobinfo before and after your attempt to run, and show the commands you are using.

Posted: Thu Dec 06, 2007 7:08 am
by AmeyJoshi14
Hi,

As per ray post your job is not in compile state, it is in Aborted state.
I have run the dsjob -run command for the job which is in the aborted stage,which is
giving following same error as you are reciving.

dsjob -run PROJECT_NAME JOB_NAME(aborted)
Error running job

Status code = -2 DSJE_BADSTATE

so to check it
dsjob -jobinfo PROJECT_NAME JOB_NAME(aborted)
It will give the following message:

Job Status : RUN FAILED (3)
Job Controller : not available
Job Start Time : Mon Nov 26 13:36:10 2007
Job Wave Number : 1
User Status : not available
Job Control : 0
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : Mon Nov 26 13:36:12 2007
Job Process ID : 0
Invocation List : TEST21

Status code = 0

So first compile the job then run the job,and then enter the following command to see the log
so that you can see the log in unix. :roll:
dsjob -logsum PROJECT_NAME JOB_NAME

Posted: Thu Dec 06, 2007 11:20 am
by pneumalin
As advised by Ray, the job is not being RESET. Therefore you ran into BADJOB state when you executed dsjob -run. Simply run dsjob -run - reset prject_name job_name or reset the job from director before dsjob -run, and the problem shall go away...