Resetting a job
Moderators: chulett, rschirm, roy
Resetting a job
Hi all,
I am working on PX Edition, but In my Environment i dont have C++ compilers got installed.Whenever a parallel job gets aborted i try to reset it through user defined Routine before its execution.If a job gets aborted,i know that without a C++ compilers its impossible to compile the jobs involving Parallel Transformers.So if i go for resetting a Job instead of recompiling,will this do any sense or will this going to work out ?
Currently i cant test this one out,that's why i opened this thread.
Thanks,
I am working on PX Edition, but In my Environment i dont have C++ compilers got installed.Whenever a parallel job gets aborted i try to reset it through user defined Routine before its execution.If a job gets aborted,i know that without a C++ compilers its impossible to compile the jobs involving Parallel Transformers.So if i go for resetting a Job instead of recompiling,will this do any sense or will this going to work out ?
Currently i cant test this one out,that's why i opened this thread.
Thanks,
Aquilis
Jobs are executed through a JobControl and which itself does the Resetting and invocation of the parallel Jobs.So when we dont have the compilers installed on the environment and previous execution status of the jobs are Aborted,then JC will try to reset it and Run.so will it succeed in resetting and executing ? i think it will not happen unless all the jobs invoked from the JC are made as multi-instantiated jobs ?
Input needed.
Input needed.
Aquilis
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your last sentence is completely erroneous - whether or not a job is multi-instance enabled has no bearing whatsoever on whether it can be reset successfully. To be reset successfully a job must simply be not in a runnable state and contain no quirks that prevent its being reset. DSPrepareJob() - that is, "reset if required, then run" - will work, and does not require recompiling anything, and therefore does not require there to be a C++ compiler.
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.
Even though the job is in aborted state and if we try to reset it knowing that we dont have c++ compilers not installed,will it get reset and will execute properly ?
But in this regard, When i try to reset the aborted job ,I am facing the Error Messsage as :
" Unable to run job----2 "
But when i make the job as multi-instance job,even the job fails it will abort as the other instance job.So this was my conclusion before,if this not the problem,then what could be the other reasons which causes this error (" Unable to run job----2 ") ?
Guidance required,
Thanks,
aquilis
But in this regard, When i try to reset the aborted job ,I am facing the Error Messsage as :
" Unable to run job----2 "
But when i make the job as multi-instance job,even the job fails it will abort as the other instance job.So this was my conclusion before,if this not the problem,then what could be the other reasons which causes this error (" Unable to run job----2 ") ?
Guidance required,
Thanks,
aquilis
Aquilis
Asked and Answered. More than once. Yes.Aquilis wrote:Even though the job is in aborted state and if we try to reset it knowing that we dont have c++ compilers not installed,will it get reset and will execute properly ?
As noted earlier, you'd need to show us how you are resetting aborted jobs. Only then could we help understand where your 'error message' is coming from.Aquilis then wrote:But in this regard, When i try to reset the aborted job ,I am facing the Error Messsage as : " Unable to run job----2 "
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
when i reset the Job,i do get status changed to 'Job has been Reset'.
The code i am using is as follows:
*Reset the Job if the job is not in the Runnable State.
ResetJobName = JobName
gosub ResetJob:
hJob3 = DSAttachJob(JobName, DSJ.ERRWARN)
If NOT(hJob3) Then
-----
-----
-----
-----
-----
Goto ExitReturnSub:
End
ResetJob:
********
hResetJob = DSAttachJob(ResetJobName, DSJ.ERRWARN)
If NOT( hResetJob) Then
----
----
----
End
ErrCode = DSSetDisableProjectHandler( hResetJob, @FALSE)
ErrCode = DSSetDisableJobHandler( hResetJob, @FALSE)
Result = DSGetJobInfo (hResetJob, DSJ.JOBSTATUS)
If (Result = DSJS.RUNFAILED) or (Result = DSJS.STOPPED) or (Result = DSJS.VALFAILED) Then
Result = DSRunJob(hResetJob,DSJ.RUNRESET)
ErrCode = DSWaitForJob(hResetJob)
End
* Release the handle for the job
ErrCode = DSDetachJob(hResetJob)
ResetJobName = ""
Return
ExitReturnSub:
***********
;
Thanks,
The code i am using is as follows:
*Reset the Job if the job is not in the Runnable State.
ResetJobName = JobName
gosub ResetJob:
hJob3 = DSAttachJob(JobName, DSJ.ERRWARN)
If NOT(hJob3) Then
-----
-----
-----
-----
-----
Goto ExitReturnSub:
End
ResetJob:
********
hResetJob = DSAttachJob(ResetJobName, DSJ.ERRWARN)
If NOT( hResetJob) Then
----
----
----
End
ErrCode = DSSetDisableProjectHandler( hResetJob, @FALSE)
ErrCode = DSSetDisableJobHandler( hResetJob, @FALSE)
Result = DSGetJobInfo (hResetJob, DSJ.JOBSTATUS)
If (Result = DSJS.RUNFAILED) or (Result = DSJS.STOPPED) or (Result = DSJS.VALFAILED) Then
Result = DSRunJob(hResetJob,DSJ.RUNRESET)
ErrCode = DSWaitForJob(hResetJob)
End
* Release the handle for the job
ErrCode = DSDetachJob(hResetJob)
ResetJobName = ""
Return
ExitReturnSub:
***********
;
Thanks,
Aquilis
Just a precautionary note with
If it needs to reset the job it will return a new JobHandle. This is normally not an issue but sometimes you need to be aware of this; I had some job control where I stored the JobHandle in an array and this changing of handles caused a lot of problems since it looked like a sporadic bug.
Code: Select all
JobHandle = DSPrepareJob(JobHandle)
If it needs to reset the job it will return a new JobHandle. This is normally not an issue but sometimes you need to be aware of this; I had some job control where I stored the JobHandle in an array and this changing of handles caused a lot of problems since it looked like a sporadic bug.