Page 1 of 1

DSJE_BADSTATE error even after recompiling and restting

Posted: Wed May 23, 2012 6:36 am
by chetan.c
Hi,

I'm trying to run a sequence from command line using the below command.

Code: Select all

$DSHome/bin/dsjob -authfile /home/logondev -run -mode RESET -wait -warn 0 -param Directory=$folder -jobstatus proj1 SEQ_MASTER
The job ran fine for 2 runs and aborted with an issue in an underlying job.
The issue with that job was fixed and compiled.

Even the master sequence was compiled and run.but facing the issue

Code: Select all

Status code = -2 DSJE_BADSTATE
Below is the DSjobinfo

Code: Select all

Job Status      : NOT RUNNING (99)
Job Controller  : not available
Job Start Time  : Wed May 23 05:17:56 2012
Job Wave Number : 0
User Status     : not available
Job Control     : not available
Interim Status  : NOT RUNNING (99)
Invocation ID   : not available
Last Run Time   : not available
Job Process ID  : 0
Invocation List : SEQ_MASTER
Job Restartable : 0

Status code = 0
I've read almost every post here but could not resolve this.
Kindly let me know anything which i can try.

Thanks,
Chetan.C

Posted: Wed May 23, 2012 6:57 am
by arvind_ds
Create a copy of the job sequence and compile it and then try to run and see whether it runs ok or not.Feedback the test results there after.

Posted: Wed May 23, 2012 7:18 am
by chetan.c
Removed the -mode RESET and the job ran fine.

Here RESET means reset if required or something else?

Thanks,
Chetan.C

Posted: Wed May 23, 2012 7:29 am
by chulett
It means RESET and that's all it does so I'm surprised you're saying it also ran the job. You should only use it when it is needed, my launch scripts always check first and reset if needed and only then run the job. Three calls to dsjob are possible in that case: one to check the status, one to reset it if needed and lastly the actual run.

Posted: Wed May 23, 2012 7:57 am
by chetan.c
chulett wrote: my launch scripts always check first and reset if need ...
Thanks Craig.
What I assumed was like in Job activity where we have option like

Code: Select all

Reset if required,then run
.So there has to be branching like if status_Code=3 then Reset else just

Code: Select all

-run without -mode 
is fine ?

Thanks,
Chetan.C

Posted: Wed May 23, 2012 7:58 am
by chulett
The 8.5 Documentation wrote:-mode specifies the type of job run. NORMAL starts a job run, RESET resets the job, VALIDATE validates the job, and RESTART resumes a restartable job sequence from the last checkpoint using the original job parameter values. If -mode is not specified, a normal job run is started.

Posted: Wed May 23, 2012 8:06 am
by chetan.c
"RESTART resumes a restartable job sequence from the last checkpoint using the original job parameter values. .
Using this now, as my sequence is restartable.
Creating some sample jobs and aborting them to test this out.


Thanks craig.