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.
UNIX just resetting the job
Moderators: chulett, rschirm, roy
Please post the command line being executed. We can't point out syntax issues unless we can see the syntax used.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 334
- Joined: Fri Dec 01, 2006 5:17 am
- Location: Texas
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.
dsjob -logsum PROJECT_NAME JOB_NAME
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.
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
dsjob -logsum PROJECT_NAME JOB_NAME
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...
Pneuma Lin.
pneumalin@yahoo.com
pneumalin@yahoo.com