DSJE_BADSTATE error even after recompiling and restting

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

DSJE_BADSTATE error even after recompiling and restting

Post 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
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post 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.
Arvind
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post by chetan.c »

Removed the -mode RESET and the job ran fine.

Here RESET means reset if required or something else?

Thanks,
Chetan.C
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

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

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

"You can never have too many knives" -- Logan Nine Fingers
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post 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.
Post Reply