Job Control Aborting with "Job is not a runnable state&
Posted: Fri Aug 04, 2006 1:53 am
Hi !
I have a job control which failed with the message below :
[i]DTMCtrlFaitSCMMens..JobControl (fatal error from DSRunJob): Job control fatal error (-2)
(DSRunJob) Job DTMAlimNBOS is not in a runnable state[/i]
When i check the DTMAlimNBOS job, it's correctly compiled and the job have [b][u]Run[/u][/b] !!! :shock:
here a piece of the job control code :
* Setup DTMAlimNBOS, run it, wait for it to finish, and test for success
hJob3 = DSAttachJob("DTMAlimNBOS", DSJ.ERRFATAL)
If NOT(hJob3) Then
Call DSLogFatal("Job Attach Failed: DTMAlimNBOS", "JobControl")
Abort
End
LimitErr= DSSetJobLimit(hJob3,DSJ.LIMITWARN,MaxWarning)
ErrCode = DSSetParam(hJob3, "dsn_cible", dsn_DTM)
ErrCode = DSSetParam(hJob3, "usr_cible", usr_DTM)
ErrCode = DSSetParam(hJob3, "pwd_cible", pwd_DTM)
ErrCode = DSSetParam(hJob3, "dsn_source", dsn_DWH)
ErrCode = DSSetParam(hJob3, "usr_source", usr_DWH)
ErrCode = DSSetParam(hJob3, "pwd_source", pwd_DWH)
ErrCode = DSRunJob(hJob3, DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(hJob3)
Status = DSGetJobInfo(hJob3, DSJ.JOBSTATUS)
If Status = DSJS.RUNFAILED Then
* Fatal Error - No Return
Call DSLogFatal("Job Failed: DTMAlimNBOS", "JobControl")
End
If Status = DSJS.RUNWARN Then
Call DSLogWarn("Job Warning : DTMAlimNBOS" ,"JobControl")
End
Any Idea ?
thanks a lot
Fred
I have a job control which failed with the message below :
[i]DTMCtrlFaitSCMMens..JobControl (fatal error from DSRunJob): Job control fatal error (-2)
(DSRunJob) Job DTMAlimNBOS is not in a runnable state[/i]
When i check the DTMAlimNBOS job, it's correctly compiled and the job have [b][u]Run[/u][/b] !!! :shock:
here a piece of the job control code :
* Setup DTMAlimNBOS, run it, wait for it to finish, and test for success
hJob3 = DSAttachJob("DTMAlimNBOS", DSJ.ERRFATAL)
If NOT(hJob3) Then
Call DSLogFatal("Job Attach Failed: DTMAlimNBOS", "JobControl")
Abort
End
LimitErr= DSSetJobLimit(hJob3,DSJ.LIMITWARN,MaxWarning)
ErrCode = DSSetParam(hJob3, "dsn_cible", dsn_DTM)
ErrCode = DSSetParam(hJob3, "usr_cible", usr_DTM)
ErrCode = DSSetParam(hJob3, "pwd_cible", pwd_DTM)
ErrCode = DSSetParam(hJob3, "dsn_source", dsn_DWH)
ErrCode = DSSetParam(hJob3, "usr_source", usr_DWH)
ErrCode = DSSetParam(hJob3, "pwd_source", pwd_DWH)
ErrCode = DSRunJob(hJob3, DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(hJob3)
Status = DSGetJobInfo(hJob3, DSJ.JOBSTATUS)
If Status = DSJS.RUNFAILED Then
* Fatal Error - No Return
Call DSLogFatal("Job Failed: DTMAlimNBOS", "JobControl")
End
If Status = DSJS.RUNWARN Then
Call DSLogWarn("Job Warning : DTMAlimNBOS" ,"JobControl")
End
Any Idea ?
thanks a lot
Fred